Training 1500
Training 1500
Basics of FB Programming
5
with SIMATIC S7-1500
SIMATIC S7 6
IEC Timers and IEC Counters
Multi-instances for SIMATIC S7-1500
Analog Values
9
for SIMATIC S7-1500
PID Controller
12
for SIMATIC S7-1200/1500
Name:
Frequency converter G120 on
13
Course from: to: PROFINET with SIMATIC S7-1500
Instructor:
14
Location:
15
16
Training Document TIA Portal Version
TIA Portal Module 001
Training Curriculum
2
TIA Portal Module 001
Table of contents
1 Goal .......................................................................................................................................... 4
2 Requirement ............................................................................................................................. 4
4 Theory ...................................................................................................................................... 5
4.2 Operator control and display elements of the CPU 1516F-3 PN/DP ........................................ 6
4.2.1 Front view of the CPU 1516F-3 PN/DP with integrated display ........................................... 6
4.2.3 Operator control and connection elements of the CPU 1516F-3 PN/DP behind the front
flap ........................................................................................................................................ 7
4.3 SIMATIC STEP 7 Professional V1X (TIA Portal V1X) programming software..................... 9
3
TIA Portal Module 001
2 Requirement
No prerequisites have to be met for successful completion of this chapter.
3 SIMATIC S7-1500 controller, e.g. CPU 1516F-3 PN/DP – Firmware V1.6 or higher
with memory card
2 SIMATIC STEP 7
1 Engineering station Professional (TIA Portal)
V14 or higher
4 Ethernet connection
4
TIA Portal Module 001
4 Theory
4.1 SIMATIC S7-1500 automation system
The SIMATIC S7-1500 automation system is a modular controller system for the middle to upper
performance range.
A comprehensive range of modules is available to optimally adapt the system to the automation
task.
SIMATIC S7-1500 is the next generation of the SIMATIC S7-300 and S7-400 automation systems
with the following new performance features:
- PROFINET IO IRT
The S7-1500 controller consists of a power supply ①, a CPU with integrated display ② and input
and output modules for digital and analog signals ③. The modules are mounted on a mounting
rail with integrated DIN rail profile ④. If necessary, communications processors and function
modules for special tasks such as stepper motor control are also used.
④
②
②
③
①
①
5
TIA Portal Module 001
4.2 Operator control and display elements of the CPU 1516F-3 PN/DP
The figure below shows the operator control and display elements of a CPU 1516F-3 PN/DP.
The arrangement and number of elements differ from this figure for other CPUs.
4.2.1 Front view of the CPU 1516F-3 PN/DP with integrated display
1) LED displays for the current operating mode and diagnostic status of the CPU
2) Display
3) Control keys
6
TIA Portal Module 001
4.2.3 Operator control and connection elements of the CPU 1516F-3 PN/DP
behind the front flap
1) LED displays for the current operating mode and diagnostic status of the CPU
2) Display connection
4) Mode selector
7) Display connection
9) Mode selector
Note: The hinged front cover with the display can be removed and inserted during operation.
7
TIA Portal Module 001
- Program card
For operation of the CPU, the MMC must be inserted because the CPUs have no integrated load
memory. A commercially available SD card reader is needed to write/read the SIMATIC memory
card with the programming device or PC. This allows files to be copied directly to the SIMATIC
memory card using Windows Explorer, for example.
Note: It is recommended that the SIMATIC Memory Card only be removed or inserted when the
CPU is in the POWER OFF state.
STOP STOP mode The CPU is not executing the user program
MRES Memory reset Position for the memory reset of the CPU
You can also use the button on the CPU operator panel of the SIMATIC STEP 7
Professional V1X software in Online & Diagnostics to switch the operating mode (STOP or RUN).
The operator panel also contains an MRES button for performing a memory reset and displays
the status LEDs of the CPU.
8
TIA Portal Module 001
- SIMATIC S7-1500
- SIMATIC S7-1200
- SIMATIC S7-300
- SIMATIC S7-400
- SIMATIC WinAC
SIMATIC STEP 7 Professional provides the following functions for plant automation:
- Programming
- Documentation
- Visualization solutions for PCs and other panels can also be created with other WinCC
software packages
® Users can specify their own default settings for certain settings in the TIA Portal. A few
important settings are shown here.
® In the project view, select the ® "Options" menu and then ® "Settings".
9
TIA Portal Module 001
® One basic setting is the selection of the user interface language and the language for the
program display. In the curriculums to follow, "English" will be used for both settings.
® Under ® "General" in "Settings", select "User interface language ® English" and "Mnemonic
® International".
10
TIA Portal Module 001
® Select the network icon in the taskbar at the bottom and click ® "Network settings".
® In the network settings window that opens, click ® "Ethernet" and then on ® "Change
adapter options".
® Select the desired ® "LAN Connection" that you want to use to connect to the controller and
click ® "Properties".
11
TIA Portal Module 001
® You can now use the following IP address, for example ® IP address: 192.168.0.99 and enter
the following ® subnet mask 255.255.255.0. Accept the settings. (® "OK" )
12
TIA Portal Module 001
13
TIA Portal Module 001
® Double-click the Totally Integrated Automation Portal to select it. ( ® TIA Portal V1X)
In the project tree under ® "Online access", select the network adapter that was set previously. If you
click ® "Update accessible devices", you will see the IP address (if previously set) or the MAC address (if
IP address not yet assigned) of the connected SIMATIC S7-1500. Select ® "Online & Diagnostics".
14
TIA Portal Module 001
® Under ® "Functions", you now find the ® "Assign IP address" item. Enter the following IP
address here (example): ® IP address: 192.168.0.1 ® Subnet mask 255.255.255.0. Next,
click ® "Assign IP address" and this new address will be assigned to your SIMATIC S7-1500.
® If the IP address was not successfully assigned, you will receive a message in the ® "Info"
window under ® "General".
15
TIA Portal Module 001
® First, select the ® "Format memory card" function and press the ® "Format" button.
® Confirm the prompt asking if you really want to format the memory card with ® "Yes".
16
TIA Portal Module 001
® Before you can reset the CPU, you must wait until the formatting of the CPU has finished.
Afterwards, you must select ® "Update accessible devices" and ® "Online & Diagnostics" of
your CPU again. To reset the controller, select the ® "Reset to factory settings" function and
then ® "Delete IP address" and click ® "Reset".
® Confirm the prompt asking if you really want to reset the module with ® "Yes".
17
TIA Portal Module 001
® Once the CPU has been reset, click ® "Update accessible devices" again. The MAC address
of the connected SIMATIC S7-1500 can now be seen. Select ® "Assign IP address" under
® "Functions" in ® "Online & Diagnostics". Enter the following IP address here (example): IP
address: 192.168.0.1 Subnet mask 255.255.255.0. Click "Assign IP address" and this new
address will be assigned to your SIMATIC S7-1500.
® You will receive a message regarding successful transfer of parameters in the ® "Info" ®
"General" window.
18
TIA Portal Module 001
In "Searching for product information", enter the CPU for which you need a firmware update. For
example:® "S7-1500 CPU1516F"
® Under "Filter criteria for entries" select the "Entry type" ® "Download" and click the entry with
firmware updates for your CPU and the associated display in the selection list.
19
TIA Portal Module 001
Various updates are offered in the next window. Select the update for your CPU that is recommended for
the upgrade.
20
TIA Portal Module 001
® If you have not already registered, do so in the next window. (® "Yes I would like to register
now"), or if already registered – log in with your "Login" and "Password". (® "Login")
Enter the requested data for the registration, select the option "Download of export restricted software"
21
TIA Portal Module 001
22
TIA Portal Module 001
® Return to the login. After login you can save the firmware update on your computer.
(® "Save as")
® Enter the desired memory location on your computer and click ® "Save".
23
TIA Portal Module 001
® Back on the Industry Online Support website of SIEMENS AG, you can select the firmware
update for your display. Select the update recommended for the upgrade. You can then save
the firmware update on your computer. (® "Save as")
Enter the desired memory location on your computer and click ® "Save".
24
TIA Portal Module 001
® Click the downloaded compressed files for your CPU and the display in Windows Explorer
and select ® "Extract All" for each compressed file.
® In the project tree under ® "Online access", select the network adapter that was set
previously. If you click ® "Update accessible devices", you will see the IP address of the
connected SIMATIC S7-1500. Select ® "Online & Diagnostics". Under the "General" menu
item, you can check the current firmware in your CPU in "Diagnostics".
25
TIA Portal Module 001
26
TIA Portal Module 001
In the ® "Functions" menu, change to ® "Firmware update" ® "PLC". In the ® "Firmware loader"
sub-item, click ® "Browse".
® Select the previously downloaded and extracted firmware file ® "6ES7 ***-*****-****.upd" on
your computer and click ® "Open".
27
TIA Portal Module 001
® The following dialog indicates whether your firmware file is compatible with your CPU. Now
start the update. (® "Run update")
® The progress of the update and its successful completion are indicated with the following
dialogs. Click ® "OK" to confirm.
28
TIA Portal Module 001
® In the project tree under ® "Online access", select the network adapter that was set
previously. If you click ®"Update accessible devices", you will see the IP address of the
connected SIMATIC S7-1500. Select ® "Online & Diagnostics" here. In the ®"Functions"
menu, change to ® "Firmware update" ® "Display". In the ®"Firmware loader" sub-item,
click ®"Browse".
® Select the previously downloaded and extracted firmware file ® "6ES7 ***-*****-****.upd" on
your computer and click ® "Open".
29
TIA Portal Module 001
® The following dialog indicates whether your firmware file is compatible with your display. Now
start the update. (® "Run update")
® The progress of the update and its successful completion are indicated with the following
dialogs. Click ® "OK" to confirm.
30
31
Training Curriculum
31
TIA Portal Module 002
Table of contents
1 Goal .................................................................................................................................................... 34
2 Prerequisite......................................................................................................................................... 34
4 Theory................................................................................................................................................. 36
4.2 Operator control and display elements of the CPU 1516F-3 PN/DP .................................. 40
4.2.1 Front view of the CPU 1516F-3 PN/DP with integrated display .......................................... 40
4.2.3 Operator control and connection elements behind the front flap ........................................ 41
4.3 Memory areas of the CPU 1516F-3 PN/DP and the SIMATIC memory card ..................... 44
4.4 STEP 7 Professional V1X (TIA Portal V1X) programming software ................................... 46
4.4.1 Project.................................................................................................................................. 46
5 Task .................................................................................................................................................... 58
6 Planning .............................................................................................................................................. 59
32
TIA Portal Module 002
7.3 Configure the Ethernet interface of the CPU 1516F-3 PN/DP ............................................ 66
7.4 Configure the access level for the CPU 1516F-3 PN/DP.................................................... 67
7.6 Configure the address areas of the digital input and output modules ................................. 69
33
TIA Portal Module 002
1 Goal
In this chapter, you will first learn how to create a project. Next you will be shown in one part of
the task how you can use the TIA Portal to detect hardware already installed and add it to a
project. This hardware will then be configured.
2 Prerequisite
You do not need any previous knowledge from other chapters to successfully complete this
chapter. You only need an S7-1500 controller.
34
TIA Portal Module 002
2 SIMATIC STEP 7
1 Engineering station Professional (TIA
Portal) as of V1X
4 Ethernet connection
35
TIA Portal Module 002
4 Theory
4.1 SIMATIC S7-1500 automation system
The SIMATIC S7-1500 automation system is a modular controller system for the middle to upper
performance range. A comprehensive range of modules is available to optimally adapt the system
to the automation task.
SIMATIC S7-1500 is the next generation of the SIMATIC S7-300 and S7-400 automation systems
with the following new performance features.
④
②
②
③
①
①
The programmable logic controller (PLC) uses the S7 program to monitor and control a machine
or process. In doing so, the S7 program scans the IO modules via input addresses (%I) and
addresses their output addresses (%Q).
The system is programmed with the STEP 7 Professional V1X software.
36
TIA Portal Module 002
System power supply modules (PS) (rated input voltages 24 V DC to 230 V AC/DC)
with connection to the backplane bus supply the configured modules with the internal supply
voltage.
37
TIA Portal Module 002
Load current supply modules (PM) (rated input voltages 120/230 V AC)
do not have a connection to the backplane bus of the S7-1500 automation system. The load
current supply is used to supply 24 V DC to the system power supply of the CPU, the input and
output circuits of IO modules and the sensors and actuators.
IO modules
for digital input (DI) / digital output (DQ) / analog input (AI) / analog output (AQ)
38
TIA Portal Module 002
① ②
③ ④ ⑤ ⑥
① Load current supply module (PM) with 120/230 V AC, 50 Hz / 60 Hz, 190 W input and 24 V
DC / 8 A output
② Central processing unit CPU 1516F-3 PN/DP with integrated PROFIBUS and PROFINET
interfaces
39
TIA Portal Module 002
4.2.1 Front view of the CPU 1516F-3 PN/DP with integrated display
LED displays for the current operating mode and diagnostic status of the CPU
Display
Control keys
40
TIA Portal Module 002
4.2.3 Operator control and connection elements behind the front flap
LED displays for the current operating mode and diagnostic status of the CPU
Display connection
Slot for the SIMATIC memory card
Mode switch
LED displays for the 3 ports of the PROFINET interfaces X1 and X2
MAC addresses of the interfaces
PROFIBUS interface (X3)
PROFINET interface (X2) with 1 port
PROFINET interface (X1) with 2-port switch
Connection for supply voltage
Fastening screws
Note: The front flap with the display can be removed and inserted during operation.
A SIMATIC Micro Memory Card is used as the memory module for the CPUs. This is a
preformatted memory card that is compatible with the Windows file system. It is available with
various storage capacities and can be used for the following purposes:
The MMC must be inserted to operate the CPU as the CPUs have no integrated load memory. A
commercially available SD card reader is needed to write/read the SIMATIC memory card with the
programming device or PG/PC. This allows files to be copied directly to the SIMATIC memory card
using Windows Explorer, for example.
Note: It is recommended that the SIMATIC memory card only be removed or inserted when the CPU is in
the POWER OFF state.
You can also use the button on the CPU operator panel of the STEP 7 Professional V1X software
in Online & Diagnostics to switch the operating mode (STOP or RUN).
The operator panel also contains an MRES button for performing a memory reset and displays
the status LEDs of the CPU.
42
TIA Portal Module 002
– OK → valid access to the menu command, confirmation of input and exit from editing
mode
– ESC → restoration of original content (which means changes are not saved) and exit
from editing mode
® For menu commands in which no input can be made:
43
TIA Portal Module 002
4.3 Memory areas of the CPU 1516F-3 PN/DP and the SIMATIC
memory card
The following figure shows the memory areas of the CPU and the load memory on the SIMATIC
memory card.
In addition to the load memory, other data can be loaded onto the SIMATIC memory card using
Windows Explorer. This includes recipes, data logs, project backups and additional
documentation for the program.
44
TIA Portal Module 002
Retentive memory
Parts of:
Global data blocks
Instance data blocks
Technology objects
Bit memory, timers, counters
Load memory
Load memory is non-volatile memory for code blocks, data blocks, technology objects and the
hardware configuration. When these objects are downloaded to the CPU, they are first stored in
the load memory. This memory is located on the SIMATIC memory card.
Work memory
Work memory is volatile memory that contains the code and data blocks. The work memory is
integrated into the CPU and cannot be expanded. In S7-1500 CPUs, the work memory is divided
into two areas:
– The code work memory contains runtime-relevant parts of the program code.
® Data work memory:
– The data work memory contains the runtime-relevant parts of the data blocks and
technology objects.
At the operating mode transitions from POWER ON to startup and from STOP to startup, tags of
global data blocks, instance data blocks and technology objects are initialized with their start
values. Retentive tags retain their actual values that were saved in the retentive memory.
Retentive memory
Retentive memory is non-volatile memory for saving certain data in the event of power failure.
The tags and operand areas that have been defined as retentive are saved in the retentive
memory. This data is retained beyond power-off or power failure.
All other program tags are set to their start values at the operating mode transitions from POWER
ON to startup and from STOP to startup.
The content of retentive memory is deleted by the following actions:
45
TIA Portal Module 002
● Memory reset
● Reset to factory settings
Note: Certain tags of technology objects are also stored in the retentive memory. These
tags are not deleted by a memory reset.
- SIMATIC S7-1500
- SIMATIC S7-1200
- SIMATIC S7-300
- SIMATIC S7-400
- SIMATIC WinAC
STEP 7 Professional V1X provides the following functions for plant automation:
- Configuration and parameter assignment of the hardware
- Specification of the communication
- Programming
- Testing, commissioning and servicing with operational/diagnostic functions
- Documentation
- Creation of visualizations for SIMATIC Basic Panels using the integrated WinCC Basic
software
- Visualization solutions for PCs and other panels can also be created with other WinCC
software packages
Support is provided for all functions through detailed online help.
4.4.1 Project
To implement a solution for an automation and visualization task, you create a project in the TIA
Portal. A project in the TIA Portal contains the configuration data for the configuration and
internetworking of devices as well as the programs and the configuration of the visualization.
The hardware of automation systems comprises controllers (CPUs), signal modules for input and
output signals (SMs) and communication processors, and interface modules (CP, IM). Power
supply and voltage supply modules (PS, PM) are also available to supply the modules.
46
TIA Portal Module 002
The signal modules and intelligent field devices connect the input and output data of the process to
be automated and visualized to the automation system.
Visualization
Visualisierung
Central structure
Zentrale Struktur
Dezentrale
Distributed Struktur
structure
Actuators/sensors
Aktoren/Sensoren
The hardware configuration enables the downloading of automation and visualization solutions to
the automation system and access to the connected signal modules by the controller.
In central structures, the input and output signals of the process are transmitted by way of
conventional wiring to the signal modules, which are connected directly to the controller.
Conventional wiring refers to the connection of sensors and actuators using 2-wire or 4-wire
cables.
The distributed structure is the predominant structure used today. Here, the sensors and actuators
are wired conventionally only as far as the signal modules of the field devices. The signal
transmission from the field devices to the controller is implemented using an industrial
communication system.
Both classic fieldbuses such as PROFIBUS, Modbus and Foundation Fieldbus as well as Ethernet-
based communication systems such as PROFINET can be used as the industrial communication
system.
In addition, intelligent field devices in which stand-alone programs run can also be connected via
the communication system. These programs can also be created with the TIA Portal.
47
TIA Portal Module 002
The functionality required and the ambient conditions are of vital importance for planning the
hardware configuration. For example, the temperature range in the application area sometimes
limits the devices available for selection. Fail-safe operation might be another requirement, for
example.
The TIA Selection Tool (Select automation technology ® TIA Selection Tool and follow the
instructions) provides you support. Note: TIA Selection Tool requires Java.
Note for online research: If more than one manual is available, you should look for the
description "Device Manual", "Product Manual" or simply "Manual" (as opposed to
"Function Manual", "List Manual", "System Manual", etc.) in order to find the device
specifications.
The portal view provides a task-oriented view of the tools for working on the project. Here, you can
quickly decide what you want to do and open the tool for the task at hand. If necessary, a change
to the project view takes place automatically for the selected task.
Figure 2 shows the portal view. At the bottom left, there is an option to switch between this view
and the project view.
48
TIA Portal Module 002
The project view, as shown in Figure 3, is used for hardware configuration, programming, creation of the
visualization and many other tasks.
By default, the project view displays the menu bar with the toolbars at the top, the project tree with all
components of a project on the left and the so-called task cards with instructions and libraries, for
example, on the right.
If an element (for example, the device configuration) is selected in the project tree, it is displayed in the
center and can be worked on there.
® Users can specify their own default settings for certain settings in the TIA Portal. A few
important settings are shown here.
® In the project view, select the ®"Options" menu and then ® "Settings".
49
TIA Portal Module 002
One basic setting is the selection of the user interface language and the language for the program
display. In the curriculums to follow, "English" will be used for both settings.
® When Safety CPUs are used (e.g. CPU 1516F-3 PN/DP) without the use of safety
engineering, it is recommended that automatic creation of the safety program be
deactivated before creating a project.
® In "Settings" under the ® "STEP 7 Safety" item, deactivate ® "Generate default fail-safe
program".
® Locate the network icon in the taskbar at the bottom and click ® "Open Network
and Sharing Center".
50
TIA Portal Module 002
® In the open Network and Sharing Center window, click ® "Change adapter settings".
® Select the desired ® "Local Area Connection" that you want to use to connect to the
controller and click ® "Properties".
51
TIA Portal Module 002
® You can use the following IP address, for example ® IP address: 192.168.0.99 ® Subnet
mask 255.255.255.0 and accept the settings (® "OK")
52
TIA Portal Module 002
® Select the Totally Integrated Automation Portal for this, which is opened here with a
double-click. (® TIA Portal V1X)
® In the project tree under ® "Online access", select the network adapter that was set previously. If you
click ® "Update accessible devices" here, you will see the IP address (if previously set) or the MAC
address (if IP address not yet assigned) of the connected SIMATIC S7-1500. Select ® "Online &
Diagnostics" here.
53
TIA Portal Module 002
54
TIA Portal Module 002
® Under® "Functions", you now find the ® "Assign IP address" item. Enter the following IP
address here (example): ® IP address: 192.168.0.1 ® Subnet mask 255.255.255.0.
Next, click ® "Assign IP address" and this new address will be assigned to your
SIMATIC S7-1500.
Note: The IP address of the SIMATIC S7-1500 can also be set via the display on the
CPU, provided this is enabled in the hardware configuration.
® If the IP address was not successfully assigned, you will receive a message in the ®
"Info" window under ® "General".
® If the IP address could not be assigned, the program data on the CPU must be deleted.
This is accomplished in 2 steps: ® "Format memory card" and ®"Reset to factory
settings".
® First, select the ® "Format memory card" function and press the ® "Format" button.
55
TIA Portal Module 002
® Confirm the prompt asking if you really want to format the memory card with ® "Yes".
® Before you can reset the CPU, you must wait until the formatting in the CPU has finished.
Then you must select ® "Update accessible devices" and ® "Online & diagnostics" of
your CPU again. To reset the controller, select the ® "Reset to factory settings" function
and click ® "Reset".
56
TIA Portal Module 002
® Confirm the prompt asking if you really want to reset the module with ® "Yes".
57
TIA Portal Module 002
5 Task
Create a project and add the modules of the existing hardware (here: SIMATIC S7-1500F with
CPU 1516F-3 PN/DP) by using the automatic hardware detection of the TIA Portal. The following
modules must be detected:
58
TIA Portal Module 002
6 Planning
Because this is a new system, a new project must be created.
The hardware for this project is already specified by the existing hardware (here: SIMATIC
S7-1516F PN/DP). Therefore, a selection does not have to be made. Instead, the listed modules of
the Trainer Package are detected directly. The order numbers (see Task or Table 1) can be used
for checking purposes.
The power module is not automatically detected and must be manually added.
As the final step, the hardware configuration must be compiled and downloaded. Any errors
present can be detected during compilation and incorrect modules can be detected when the
controller is started (only possible when hardware is present and structured identically).
® In the portal view under the "Start" menu, select the command ® "Create new project".
59
TIA Portal Module 002
® Modify Project name, Path, Author and Comment as appropriate and click ® "Create".
® The project will be created and opened and the menu "Start", "First steps" will open
automatically.
60
TIA Portal Module 002
® The "Show all devices" menu opens in the "Devices & Networks" portal.
® Create a new CPU. Use an unspecified model of the S7-1500 CPU with order number
6ES7 5XX-XXXXX-XXXX for this.
61
TIA Portal Module 002
® Click "Add".
62
TIA Portal Module 002
® The TIA Portal now switches automatically to the project view and displays a notice there
that this device is not specified. In order to have the hardware configuration automatically
detected, start detection by clicking "detect" in the yellow information box (® detect).
63
TIA Portal Module 002
® Select the type of your PG/PC interface. (® Type of the PG/PC interface: PN/IE).
® You can now select the network adapter you want to use to establish an Ethernet
connection to the PLC. (® PG/PC interface: Intel(R) Ethernet Connection I217-LM)
® The search for devices in the network must be started by clicking the ®
button.
64
TIA Portal Module 002
® All accessible nodes are found and listed. If you have selected the correct CPU, the
corresponding CPU and all the connected modules will be detected when you click
"Detect".
Note: If the list does not contain your CPU, ensure that you have selected the correct network adapter
and established a connection between the laptop and CPU.
® The TIA Portal shows the complete device configuration of the selected CPU. Only the
power module is lacking. This can be placed on slot 0 of the mounting rail later.
65
TIA Portal Module 002
Note: You can now configure the CPU there according to your specifications. Possible
settings include the PROFINET and PROFIBUS DP interfaces, startup characteristics,
cycle, password protection, communication load and many others.
® Under ® "Properties", open the ® "PROFINET-interface [X1]" menu and select the ®
"Ethernet addresses" entry there.
® Under "Interface connected with", only the "Not connected" entry is available.
66
TIA Portal Module 002
7.4 Configure the access level for the CPU 1516F-3 PN/DP
® Switch to the ® "Protection" menu and select access level ® "Full access incl. fail-safe
(no protection)".
Note: The setting "Full access incl. fail-safe (no protection)" is recommended because a
safety program is not created here and thus we also do not have to assign a password.
67
TIA Portal Module 002
Note: If a module as well as the power module is planned for one slot, it is not possible to
place it at another position even in the device configuration.
68
TIA Portal Module 002
7.6 Configure the address areas of the digital input and output
modules
® The next step is to check the address areas of the inputs and output cards and adapt
them if necessary. DI/DO should have an address area of 0…3 and AI/AO should have
an address area of 64…79 and 64…71, respectively. (® Device overview ® DI
32x24VDC HF_1 ® I address: 0..3 ® DQ 32x24VDC/0.5A HF_1 ® Q address: 0...3 ®
AI 8xU/I/RTD/TC ST_1 ® I address: 64…79 ® AQ 4xU/I ST_1 ® Q address: 64…71)
Note: To show and hide the Device overview, you must click the small arrow next to
"Device data" on the right side of the hardware configuration.
button. To compile your CPU with the device configuration, first select the
69
TIA Portal Module 002
Note: "Save project" should be used repeatedly when working on a project since this does not happen
automatically. A prompt to save the project only occurs when the TIA Portal is closed.
® If the project was compiled without errors, you see the following screen.
70
TIA Portal Module 002
® The manager for configuring the connection properties (extended download) opens.
® First, the interface must be correctly selected. This happens in three steps.
71
TIA Portal Module 002
® The ® "Show all compatible devices" check box must be selected. The search for
72
TIA Portal Module 002
73
TIA Portal Module 002
® If your CPU is shown in the "Compatible devices in target subnet" list, it must be selected.
The download can then be started. (® CPU 1516F-3 PN/DP ® "Load")
® You first obtain a preview. Confirm the prompt ® "Overwrite all" and continue with ®
"Load".
Note: The symbol should be visible in every line of the "Load preview". You can find
additional information in the "Message" column.
74
TIA Portal Module 002
® The ® "Start all" option will be selected next before the download operation can be
completed with ® "Finish".
® After a successful download, the project view will open again automatically. A loading
report appears in the information field under "General". This can be helpful when
troubleshooting an unsuccessful download.
75
TIA Portal Module 002
7.9 Checklist
76
SCE Training Curriculum
77
TIA Portal Module 003
Table of contents
1 Goal .................................................................................................................................................... 80
2 Prerequisite......................................................................................................................................... 80
4 Theory................................................................................................................................................. 82
4.2 Operator control and display elements of the CPU 1516F-3 PN/DP.......................................... 85
4.2.1 Front view of the CPU 1516F-3 PN/DP with integrated display ......................................... 86
4.2.3 Operator control and connection behind the front flap ....................................................... 87
4.3 Memory areas of the CPU 1516F-3 PN/DP and the SIMATIC memory card............................. 90
4.5 STEP 7 Professional V1X (TIA Portal V1X) programming software .......................................... 96
4.5.1 Project................................................................................................................................. 96
78
TIA Portal Module 003
7.3 Configure the Ethernet interface of the CPU 1516F-3 PN/DP ................................................. 115
7.4 Configure the fail-safe operation of the CPU 1516F-3 PN/DP ................................................. 116
7.5 Configure the access level for the CPU 1516F-3 PN/DP ......................................................... 117
7.14 Configuration of the potential groups of the Base Units ........................................................... 126
79
TIA Portal Module 003
1 Goal
In this chapter, you will first learn how to create a project. You are then shown how the
hardware is configured.
2 Prerequisite
You do not need any previous knowledge from other chapters to successfully complete this
chapter.
80
TIA Portal Module 003
2 SIMATIC STEP 7
1 Engineering station Professional (TIA
Portal) as of V13
5 Ethernet connection
5 Ethernet connection
4 ET 200SP distributed IO
81
TIA Portal Module 003
4 Theory
4.1 SIMATIC S7-1500 automation system
The SIMATIC S7-1500 automation system is a modular controller system for the middle to upper
performance range. A comprehensive range of modules is available to optimally adapt the system
to the automation task.
SIMATIC S7-1500 is the next generation of the SIMATIC S7-300 and S7-400 automation systems
with the following new performance features.
④
②
②
③
①
①
The programmable logic controller (PLC) uses the S7 program to monitor and control a machine
or process. In doing so, the S7 program scans the IO modules via input addresses (%I) and
addresses their output addresses (%Q).
The system is programmed with the STEP 7 Professional V1X software.
82
TIA Portal Module 003
System power supply modules (PS) (rated input voltages 24 V DC to 230 V AC/DC)
with connection to the backplane bus supply the configured modules with the internal supply
voltage.
83
TIA Portal Module 003
Load current supply modules (PM) (rated input voltages 120/230 V AC)
do not have a connection to the backplane bus of the S7-1500 automation system. The load
current supply is used to supply 24 V DC to the system power supply of the CPU, the input and
output circuits of IO modules and the sensors and actuators.
IO modules
for digital input (DI) / digital output (DQ) / analog input (AI) / analog output (AQ)
84
TIA Portal Module 003
① ②
① Load current supply module (PM) with 120/230 V AC, 50 Hz / 60 Hz, 190 W input and
24 V DC / 8 A output
② Central processing unit CPU 1516F-3 PN/DP with integrated PROFIBUS and PROFINET
interfaces
4.2 Operator control and display elements of the CPU 1516F-3 PN/DP
The figure below shows the operator control and display elements of a CPU 1516F-3 PN/DP.
The arrangement and number of elements differ from this figure for other CPUs.
85
TIA Portal Module 003
4.2.1 Front view of the CPU 1516F-3 PN/DP with integrated display
86
TIA Portal Module 003
Note: The front flap with the display can be removed and inserted during operation.
Note: The PROFINET field devices (ET 200SP in this case) should be connected to the
PROFINET interface(X1) with the 2 ports.
87
TIA Portal Module 003
programming device or PC. This allows files to be copied directly to the SIMATIC memory card
using Windows Explorer, for example.
Note: It is recommended that the SIMATIC memory card only be removed or inserted
when the CPU is in the POWER OFF state.
You can also use the button on the CPU operator panel of the STEP 7 Professional V1X software
in Online & Diagnostics to switch the operating mode (STOP or RUN).
The operator panel also contains an MRES button for performing a memory reset and displays
the status LEDs of the CPU.
88
TIA Portal Module 003
● An ESC key
● An OK key
– OK → valid access to the menu command, confirmation of input and exit from editing
mode
– ESC → restoration of original content (which means changes are not saved) and exit
from editing mode
® For menu commands in which no input can be made:
89
TIA Portal Module 003
4.3 Memory areas of the CPU 1516F-3 PN/DP and the SIMATIC
memory card
The following figure shows the memory areas of the CPU and the load memory on the SIMATIC
memory card.
In addition to the load memory, other data can be loaded onto the SIMATIC memory card using
Windows Explorer. This includes recipes, data logs, project backups and additional
documentation for the program.
90
TIA Portal Module 003
Load memory
Load memory is non-volatile memory for code blocks, data blocks, technology objects and the
hardware configuration. When these objects are downloaded to the CPU, they are first stored in
the load memory. This memory is located on the SIMATIC memory card.
Work memory
Work memory is volatile memory that contains the code and data blocks. The work memory is
integrated into the CPU and cannot be expanded. In S7-1500 CPUs, the work memory is divided
into two areas:
– The code work memory contains runtime-relevant parts of the program code.
® Data work memory:
– The data work memory contains the runtime-relevant parts of the data blocks and
technology objects.
At the operating mode transitions from POWER ON to startup and from STOP to startup, tags of
global data blocks, instance data blocks and technology objects are initialized with their start
values. Retentive tags retain their actual values that were saved in the retentive memory.
Retentive memory
Retentive memory is non-volatile memory for saving certain data in the event of power failure.
The tags and operand areas that have been defined as retentive are saved in the retentive
memory. This data is retained beyond power-off or power failure.
All other program tags are set to their start values at the operating mode transitions from POWER
ON to startup and from STOP to startup.
The content of retentive memory is deleted by the following actions:
● Memory reset
91
TIA Portal Module 003
②
④
①
The distributed IO provide inputs and outputs locally for the process connection, which can be
read and written by the central processing unit via a bus protocol. In doing so, the IO modules are
scanned in the S7 program using input addresses (%I) and addressed using output addresses
(%Q) in the usual way.
Because the distributed IO are an extension of the central controller, the system is also
configured with the STEP 7 Professional V1X software.
92
TIA Portal Module 003
BaseUnits
as universal basic modules for electrical and mechanical connection of the IO modules.
They are available in a light version BU..D that opens a new potential group for the voltage supply
over the backplane bus and in a dark version BU..B that continues the potential group. At least
one light BaseUnit BU..D must always be used in order to supply at least one potential group with
voltage. The IO modules are inserted on the BaseUnits.
93
TIA Portal Module 003
IO modules
for digital input (DI) / digital output (DQ) / analog input (AI) / analog output (AQ).
They are available in versions for 24 V DC ① and 400 V AC ②
① ②
① ③
②
94
TIA Portal Module 003
Server module
as a termination for the configuration of the ET 200SP system.
It can be used as a holder for 3 spare fuses. It serves as a terminating resistor for the backplane
bus and is thus a mandatory component.
④ ⑤ ⑥
① ② ③ ④ ⑤ ⑥
⑥ Server module
95
TIA Portal Module 003
- SIMATIC S7-1500
- SIMATIC S7-1200
- SIMATIC S7-300
- SIMATIC S7-400
- SIMATIC WinAC
STEP 7 Professional V1X provides the following functions for plant automation:
- Configuration and parameter assignment of the hardware
- Specification of the communication
- Programming
- Testing, commissioning and servicing with operational/diagnostic functions
- Documentation
- Creation of visualizations for SIMATIC Basic Panels using the integrated WinCC Basic
software
- Visualization solutions for PCs and other panels can also be created with other WinCC
software packages
4.5.1 Project
To implement a solution for an automation and visualization task, you create a project in the TIA
Portal. A project in the TIA Portal contains the configuration data for the configuration and
internetworking of devices as well as the programs and the configuration of the visualization.
The hardware of automation systems comprises controllers (CPUs), signal modules for input and
output signals (SMs) and communication processors, and interface modules (CP, IM). Power
supply and voltage supply modules (PS, PM) are also available to supply the modules.
The signal modules and intelligent field devices connect the input and output data of the process to
be automated and visualized to the automation system.
96
TIA Portal Module 003
Visualization
Central structure
Distributed structure
Actuators/sensors
The hardware configuration enables the downloading of automation and visualization solutions to
the automation system and access to the connected signal modules by the controller.
In central structures, the input and output signals of the process are transmitted by way of
conventional wiring to the signal modules, which are connected directly to the controller.
Conventional wiring refers to the connection of sensors and actuators using 2-wire or 4-wire
cables.
The distributed structure is the predominant structure used today. Here, the sensors and actuators
are wired conventionally only as far as the signal modules of the field devices. The signal
transmission from the field devices to the controller is implemented using an industrial
communication system.
Both classic fieldbuses such as PROFIBUS, Modbus and Foundation Fieldbus as well as Ethernet-
based communication systems such as PROFINET can be used as the industrial communication
system.
In addition, intelligent field devices in which stand-alone programs run can also be connected via
the communication system. These programs can also be created with the TIA Portal.
97
TIA Portal Module 003
inputs and outputs needed. As the final step, a power supply that ensures that the necessary
power is supplied must be selected for each controller or field device.
The functionality required and the ambient conditions are of vital importance for planning the
hardware configuration. For example, the temperature range in the application area sometimes
limits the devices available for selection. Fail-safe operation might be another requirement, for
example.
The TIA Selection Tool (Select automation technology ® TIA Selection Tool and follow the
instructions) provides you support. Note: TIA Selection Tool requires Java.
Note for online research: If more than one manual is available, you should look for the
description "Device Manual", "Product Manual" or simply "Manual" (as opposed to
"Function Manual", "List Manual", "System Manual", etc.) in order to find the device
specifications.
The portal view provides a task-oriented view of the tools for working on the project. Here, you can
quickly decide what you want to do and open the tool for the task at hand. If necessary, a change
to the project view takes place automatically for the selected task.
Figure 2 shows the portal view. At the bottom left, there is an option to switch between this view
and the project view.
98
TIA Portal Module 003
The project view, as shown in Figure 3 is used for hardware configuration, programming, creation
of the visualization and many other tasks.
By default, the project view displays the menu bar with the toolbars at the top, the project tree with
all components of a project on the left and the so-called task cards with instructions and libraries,
for example, on the right.
If an element (for example, the device configuration) is selected in the project tree, it is displayed in
the center and can be worked on there.
® Users can specify their own default settings for certain settings in the TIA Portal. A few
important settings are shown here.
® In the project view, select the ®"Options" menu and then ® "Settings".
99
TIA Portal Module 003
® One basic setting is the selection of the user interface language and the language for the
program display. In the curriculums to follow, "English" will be used for both settings.
® When Safety CPUs are used (e.g. CPU 1516F-3 PN/DP) without the use of safety
engineering, it is recommended that automatic creation of the safety program be
deactivated before creating a project.
® In "Settings" under the ® "STEP 7 Safety" item, deactivate ® "Generate default fail-
safe program".
® Locate the network icon in the taskbar at the bottom and click ® "Open Network
and Sharing Center".
100
TIA Portal Module 003
® In the open Network and Sharing Center window, click ® "Change adapter settings".
® Select the desired ® "Local Area Connection" that you want to use to connect to the
controller and click ® "Properties".
101
TIA Portal Module 003
® You can use the following IP address, for example ® IP address: 192.168.0.99 ® Subnet
mask 255.255.255.0 and accept the settings (® "OK")
® Select the Totally Integrated Automation Portal for this, which is opened here with a
double-click. (® TIA Portal V1X)
102
TIA Portal Module 003
® In the project tree under ® "Online access", select the network adapter that was set
previously. If you click ® "Update accessible devices" here, you will see the IP address (if
previously set) or the MAC address (if IP address not yet assigned) of the connected
SIMATIC S7-1500. Select ® "Online & Diagnostics" here.
103
TIA Portal Module 003
® Under® "Functions", you now find the ® "Assign IP address" item. Enter the following
IP address here (example): ® IP address: 192.168.0.1 ® Subnet mask 255.255.255.0.
Next, click ® "Assign IP address" and this new address will be assigned to your
SIMATIC S7-1500.
Note: The IP address of the SIMATIC S7-1500 can also be set via the display on the
CPU, provided this is enabled in the hardware configuration.
® If the IP address was not successfully assigned, you will receive a message in the ®
"Info" window under ® "General".
® If the IP address could not be assigned, the program data on the CPU must be deleted.
This is accomplished in 2 steps: ® "Format memory card" and ®"Reset to factory
settings".
® First, select the ® "Format memory card" function and press the ® "Format" button.
104
TIA Portal Module 003
® Confirm the prompt asking if you really want to format the memory card with ® "Yes".
® Before you can reset the CPU, you must wait until the formatting in the CPU has finished.
Then you must select ® "Update accessible devices" and ® "Online & diagnostics" of
your CPU again. To reset the controller, select the ® "Reset to factory settings" function
and click ® "Reset".
105
TIA Portal Module 003
® Confirm the prompt asking if you really want to reset the module with ® "Yes".
® Select the Totally Integrated Automation Portal for this, which is opened here with a
double-click. (® TIA Portal V1X)
106
TIA Portal Module 003
® In the project tree under ® "Online access", select the network adapter that was set
previously. If you click ® "Update accessible devices" here, you will see the IP address (if
previously set) or the MAC address (if the IP address is not yet assigned) of the
connected ET 200SP. Select ® "Online & Diagnostics" here.
® Under® "Functions", you now find the ® "Assign IP address" item. Enter the following
IP address here (example): ® IP address: 192.168.0.2 ® Subnet mask 255.255.255.0.
Next, click ® "Assign IP address" and this new address will be assigned to your
ET 200SP.
107
TIA Portal Module 003
® A feedback message for the assignment of the IP address is provided in the ® "Info"
window under ® "General".
Note: If a communication connection already exists between the ET 200SP (as device)
and a higher-level controller (as controller), the IP address cannot be changed.
® Before you can read the firmware version of the ET 200SP, you must select ® "Update
accessible devices" and ® "Online & diagnostics" of your ET 200SP again. You can read
the Short description, Article number, Hardware version and Firmware version in menu
item ® "Diagnostics" ® "General".
108
TIA Portal Module 003
5 Task
Create a project and configure the following modules of your hardware, which correspond to one
part of SIMATIC CPU 1516F PN/DP Safety and SIMATIC ET 200SP Digital.
109
TIA Portal Module 003
6 Planning
Because this is a new system, a new project must be created.
The hardware for this project is already specified by the existing hardware. Therefore, a selection
does not have to be made. Instead, the listed modules of the trainer packages only have to be
inserted in the project and connected. The order numbers (see Table 1 and Table 2) can be used
to check that the correct modules are inserted.
IM155-6PN HF 6ES7155-6AU00-0CN0 0
DI 8x24VDC HF 6ES7131-6BF00-0CA0 1 0
DI 8x24VDC HF 6ES7131-6BF00-0CA0 2 1
DQ 8x24VDC/0.5A HF 6ES7132-6BF00-0CA0 3 0
DQ 8x24VDC/0.5A HF 6ES7132-6BF00-0CA0 4 1
Server module 6ES7193-6PA00-0AA0 5
Table 2: Modules of the ET 200SP
The Base Units are relevant for additional handling of the ET 200SP modules. These determine
whether the potential is taken from the left terminal (dark Base Unit) or whether a new voltage
supply must be connected and thus a new potential group is created (light Base Unit). The
applicable rule here is that a new potential must always be provided on slot 1.
All Base Units included in the trainer packages are type BU15-P16+A0+2D (6ES7193-6BP00-
0DA0). As a result, the light Base Unit version is set by default.
As the final step, the hardware configuration is saved, compiled, downloaded and started.
Any errors present can be detected during compilation and incorrect modules can be detected
when the controller is started (only possible when hardware is present and structured identically).
110
TIA Portal Module 003
® In the portal view under the "Start" menu, select ® "Create new project".
® Modify Project name, Path, Author and Comment as appropriate and click ® "Create".
® The project is created and opened and the menu "Start", "First steps" opens
automatically.
111
TIA Portal Module 003
® In the "Devices & Networks" portal, the "Show all devices" menu opens
112
TIA Portal Module 003
® The specified model of the CPU will now be added as a new device.
113
TIA Portal Module 003
® Click "Add".
Note: The desired CPU may have multiple versions that differ in functionality (work
memory, integrated memory, technology functions, etc.). In this case, you should ensure
that the selected CPU corresponds to the existing hardware.
Note: Different firmware versions are often offered for the hardware. In this case, it is
recommended that the latest firmware (selected by default) be used and that the CPU be
upgraded, if necessary.
® The TIA Portal now changes automatically to the project view and displays the selected
CPU in the device configuration in slot 1 of a rail.
114
TIA Portal Module 003
Note: You can now configure the CPU there according to your specifications. Possible
settings include the PROFINET and PROFIBUS DP interfaces, startup characteristics,
cycle, communication load and many others.
® Under "Interface networked with", only the "Not networked" entry is available.
115
TIA Portal Module 003
116
TIA Portal Module 003
7.5 Configure the access level for the CPU 1516F-3 PN/DP
® Switch to the ® "Protection" menu and select access level ® "Full access incl. fail-safe
(no protection)".
Note: The "Full access incl. fail-safe (no protection)" setting is recommended because we
do not have to assign a password.
117
TIA Portal Module 003
Note: To select a component in the hardware catalog, you can simply enter the order
number in the Search field and then click the "Search down" icon . The hardware
catalog will open at the correct position.
Note: When you double-click a module in the hardware catalog, you insert it at the next
available compatible slot.
Note: If a module such as the power module is planned only for one slot, it is also not
possible to place it at another position in the device configuration.
118
TIA Portal Module 003
® Find the correct IM155-6PN HF interface module in the hardware catalog and insert it by
moving it to the network view using drag-and-drop. (® Hardware Catalog ®
Distributed IO → ET 200SP → Interface modules → PROFINET → IM 155-6 PN HF →
6ES7 155-6AU00-0CN0 → Version: V3.1)
® Assign the field device of the CPU 1516F by first clicking on the interface of the
IM155-6PN HF in the network view and then connecting it to the PROFINET interface
(X1) of the CPU 1516F.
119
TIA Portal Module 003
120
TIA Portal Module 003
Note: This name is then applied as the device name for PROFINET communication.
® Under "PROFINET device name interface[X1]", the IP address can then be set or the
IO device and the "PROFINET device name" can be checked.
(® PROFINET interface[X1] ® Ethernet addresses ® IP protocol → IP address:
192.168.0.2 → PROFINET → PROFINET device name → SortingStation01)
® The settings for the 'IO cycle' such as 'Update time' and 'Watchdog time' can also be set
here for the device.
(® PROFINET interface[X1] ® Advanced options ® Real time settings → IO cycle →
Update time → 1,000 ms → Watchdog time → 3,000 ms)
121
TIA Portal Module 003
® Note: You can also open the device view of the different devices in the drop-down menu
at the top left of the device view.
122
TIA Portal Module 003
® Find the correct digital input module with the matching order number and version in
the hardware catalog. Insert the digital input module into slot 1. (®Hardware Catalog
® DI ® DI 8x24VDC HF → 6ES7 131-6BF00-0CA0 → Version: V1.2)
Notes:
When you double-click a module in the hardware catalog, you insert it automatically at
the next available compatible slot .Insert a digital input module of the same type into
slot 2
If you do not use a slot, you must close the gap before you compile. Otherwise, an error
message occurs.
123
TIA Portal Module 003
124
TIA Portal Module 003
Note: If the new component is not displayed for selection, it is not compatible with the
previous component. In this case, the old component must be deleted and the new
component must then be inserted from the hardware catalog.
125
TIA Portal Module 003
Note: If you forget the server module, it is automatically created when the device
configuration is compiled.
Note: To show and hide the Device overview, you must click the small arrow next to
"Device data" on the right side of the hardware configuration.
126
TIA Portal Module 003
127
TIA Portal Module 003
® Repeat these steps for slots 3 to 4 and compare the device configuration with the
following figure.
128
TIA Portal Module 003
® button. To compile your CPU with the device configuration, first select
the ® "CPU_1516F [CPU1516F-3 PN/DP]" folder and click the "Compile" icon ® .
Note: "Save project" should be used repeatedly when working on a project since this
does not happen automatically. A prompt to save the project only occurs when the
TIA Portal is closed.
® If the project was compiled without errors, you see the following screen.
Note: A warning appears here because no protection level has been configured. This
warning can be ignored.
129
TIA Portal Module 003
® In order for the controller, CPU1516F-3 PN/DP in this case, to find the assigned
PROFINET devices in the network, the device name must be assigned to them. This is
done by selecting the network connecting the devices in the "Network view" and clicking
Note: The IP addresses set in the project are assigned by the controller to the devices
later when the communication connection is established.
130
TIA Portal Module 003
® Online access must be correctly set in the dialog for assignment of the PROFINET device
names. Any device can then be selected individually and filtered by devices of the same
type. If a new device is being connected for the first time, the list has to be updated again.
( ® PROFINET device name: sortingstation01 ® Type of PG/PC interface: PN/IE ®
PG/PC interface: here: Intel(R) Ethernet Connection I217-LM ® Only show devices of
® The correct device must be always be clearly determined by the MAC address printed on
the device before the name is assigned. To check this, you can also have the LEDs on
the device flash.
(® ®
131
TIA Portal Module 003
® Successful assignment of the PROFINET device name should be checked before closing
the dialog. (® )
132
TIA Portal Module 003
® The manager for configuring the connection properties (extended download) opens.
133
TIA Portal Module 003
® First, the interface must be correctly selected. This happens in three steps.
134
TIA Portal Module 003
® The ® "Show all compatible devices" check box must then be selected. The search for
devices in the network is started by clicking the ® button.
® If your CPU is shown in the "Compatible devices in target subnet" list, it must be selected
and the download started.
(® CPU 1516F-3 PN/DP ® )
135
TIA Portal Module 003
® You first obtain a preview. Confirm the prompt ® "Overwrite all" and continue
with ® .
Note: The symbol should be visible in every line of the "Load preview". You can find
additional information in the "Message" column.
® The ® "Start all" option will be selected next before the download operation can be
completed with ® .
® After a successful download, the project view will open again automatically. A download
report appears in the information field under "General". This can be helpful when
troubleshooting an unsuccessful download.
136
TIA Portal Module 003
137
TIA Portal Module 003
7.18 Checklist
8 ET 200SP slot 1…2: Digital input module with correct order number
9 ET 200SP slot 1…2: Digital input module with correct firmware version
10 ET 200SP slot 1…2: Address area of the digital input module is correct
11 ET 200SP slot 3…4: Digital output module with correct order number
12 ET 200SP slot 3…4: Digital output module with correct firmware version
13 ET 200SP slot 3…4: Address area of the digital output module is correct
14 ET 200SP slot 5: Server module with correct order number
16 ET 200SP modules have all the correct potential groups set for the
Base Units
138
Training Curriculum
139
TIA Portal Module 004
Table of contents
1 Goal .................................................................................................................................................. 141
2 Prerequisite....................................................................................................................................... 141
3 Required hardware and software ..................................................................................................... 141
4 Theory............................................................................................................................................... 142
4.1 Operating system and application program .............................................................................. 142
4.2 Organization blocks................................................................................................................... 142
4.3 Process image and cyclic program processing......................................................................... 144
4.4 Functions ................................................................................................................................... 145
4.5 Function blocks and instance data blocks................................................................................. 145
4.6 Global data blocks..................................................................................................................... 146
4.7 Library-compatible code blocks................................................................................................. 147
4.8 Programming languages ........................................................................................................... 148
5 Task .................................................................................................................................................. 149
6 Planning ............................................................................................................................................ 149
6.1 EMERGENCY STOP ................................................................................................................ 149
6.2 Manual mode – Conveyor motor in manual mode .................................................................... 149
7 Structured step-by-step instructions ................................................................................................. 150
7.1 Retrieve an existing project ....................................................................................................... 150
7.2 Create a new tag table .............................................................................................................. 151
7.3 Create new tags within a tag table ............................................................................................ 153
7.4 Import "Tag_table_sorting_station" ........................................................................................... 154
7.5 Create function FC1 "MOTOR_MANUAL" for the conveyor motor in manual mode ................ 156
7.6 Define the interface of function FC1 "MOTOR_MANUAL"........................................................ 157
7.7 Program FC1: MOTOR_MANUAL ............................................................................................ 159
7.8 Program organization block OB1 – Control of the forward belt tracking in manual mode ........ 165
7.9 Program organization block OB1 – Control of the backward belt tracking in manual mode..... 170
7.10 Save and compile the program ................................................................................................. 171
7.11 Download the program .............................................................................................................. 172
7.12 Monitor program blocks............................................................................................................. 173
8 Checklist ........................................................................................................................................... 176
140
TIA Portal Module 004
BASICS OF FC PROGRAMMING
1 Goal
In this chapter, you will get to know the basic elements of a control program – the
organization blocks (OBs), functions (FCs), function blocks (FBs) and data blocks
(DBs). In addition, you will be introduced to library-compatible function und function block
programming. You will get to know the Function Block Diagram (FBD) programming
language and use it to program a function (FC1) and an organization block (OB1).
2 Prerequisite
This chapter builds on the hardware configuration of SIMATIC S7 CPU1516F-3 PN/DP.
However, other hardware configurations that have digital input and output cards can be used.
2 SIMATIC STEP 7
Professional (TIA
1 Engineering station
Portal) as of V13
4 Ethernet connection
Control panel
3 SIMATIC S7-1500 controller
141
TIA Portal Module 004
4 Theory
4.1 Operating system and application program
Every controller (CPU) contains an operating system, which organizes all functions and
processes of the CPU that are not associated with a specific control task. The tasks of the
operating system include the following:
- Performing a warm restart
- Updating the process image of the inputs and outputs
- Cyclically calling the user program
- Detecting interrupts and calling interrupt OBs
- Detecting and handling errors
- Managing memory areas
The operating system is an integral component of the CPU and comes pre-installed.
The user program contains all functions that are necessary for executing your specific
automation task. The tasks of the user program include the following:
- Checking the basic requirements for a warm restart using startup OBs
- Processing of process data, i.e. activation of output signals as a function of the input
signal states
- Reaction to interrupts and interrupt inputs
- Error handling during normal program execution
142
TIA Portal Module 004
Startup routine
ON (Run)
OB 100 Warm
restart ...
Cyclic program
processing Interrupt-driven
Cycle program processing
OB 1
OB 10 ... 17
OB 56
Interruption
Interrupt ...
143
TIA Portal Module 004
PIQ
Last instruction
Note: The time the CPU needs for this sequence is called cycle time. This depends, in turn,
on the number and type of instructions and the processor performance of the controller.
144
TIA Portal Module 004
4.4 Functions
Functions (FCs) are logic blocks without memory. They have no data memory in which
values of block parameters can be stored. Therefore, all interface parameters must be
connected when a function is called. To store data permanently, global data blocks must be
created beforehand.
A function contains a program that is executed whenever the function is called from another
code block.
Functions can be used, for example, for the following purposes:
- Math functions – that return a result dependent on input values.
- Technological functions – such as individual controls with binary logic operations.
A function can also be called several times at different points within a program.
Organization block
Main [OB1]
145
TIA Portal Module 004
Function blocks are always executed when called from another code block. A function block
can also be called several times at different points within a program. This facilitates the
programming of frequently recurring complex functions.
A call of a function block is referred to as an instance. Each instance of a function block is
assigned a memory area that contains the data that the function block uses. This memory is
made available by data blocks created automatically by the software.
It is also possible to provide memory for multiple instances in one data block in the form of a
multi-instance. The maximum size of instance data blocks varies depending on the CPU. The
tags declared in the function block determine the structure of the instance data block.
Figure 4: Function block and instance with call from organization block Main [OB1]
146
TIA Portal Module 004
Function_10
Global DB
Access for all blocks
(DB_Global)
Function_11
147
TIA Portal Module 004
148
TIA Portal Module 004
You can thus use simple instructions, for example, to control binary outputs, evaluate edges
and execute jump functions in the program.
Program elements such as IEC timers and IEC counters provide complex instructions.
The empty box serves as a placeholder in which you can select the required instruction.
Enable input EN (enable)/ Enable output ENO (enable output) mechanism:
- An instruction without EN/ENO mechanism is executed independent of the signal state at
the box inputs.
- Instructions with EN/ENO mechanism are only executed if enable input "EN input has
signal state "1". When the box is processed correctly, enable output "ENO" has signal
state "1". As soon as an error occurs during the processing, the "ENO" enable output is
reset. If enable input EN is not connected, the box is always executed.
5 Task
The following functions of the sorting station process description will be planned, programmed
and tested in this chapter:
- Manual mode – Conveyor motor in manual mode
6 Planning
The programming of all functions in OB1 is not recommended for reasons of clarity and
reusability. The majority of the program code will therefore be moved into functions (FCs) and
function blocks (FBs). The decision on which functions are be moved to FCs and which is to
run in OB 1 is planned below.
Output
149
TIA Portal Module 004
® The next step is to select the target directory where the retrieved project will be stored.
Confirm your selection with "OK". (® Target directory ® OK)
150
TIA Portal Module 004
151
TIA Portal Module 004
152
TIA Portal Module 004
® Change the address to %Q0.0 (Q 0.0) by entering this directly or by clicking the drop-
down arrow to open the Addressing menu, changing the operand identifier to Q and
confirming with Enter or by clicking the check mark. (® %I0.0 ® Operand identifier ® Q
® )
® Enter the "Conveyor motor M1 forwards fixed speed" comment for the tag.
153
TIA Portal Module 004
® Add a new Q2 tag in line 2. TIA Portal has automatically assigned the same data type as
in line 1 and has incremented the address by 1 to %Q0.1 (Q0.1). Enter the comment
"Conveyor motor M1 backwards fixed speed".
® Select the desired symbol table (e.g. in .xlsx format) and confirm the selection with
"Open".
(® SCE_EN_020-100_Tag_table_sorting_station… ® Open)
® When the import is finished, you will see a confirmation window and have an opportunity
to view the log file for the import. Click ® OK.
154
TIA Portal Module 004
® You can see that some addresses have been highlighted in orange. These are duplicate
addresses and the names of the associated tags have been numbered automatically to
avoid confusion.
® Delete the duplicate tags by selecting the lines and pressing the Del key on your
keyboard or by selecting "Delete" in the shortcut menu.
® You now have a complete symbol table of the digital inputs and outputs in front of you.
Save your project under the name 032-100_FCProgramming.
155
TIA Portal Module 004
® Rename your new block to: "MOTOR_MANUAL", set the language to FBD and keep
automatic assignment of the number. Select the "Add new and open" check box. You are
then taken automatically to your created function block in the project view.Click "Add".
156
TIA Portal Module 004
® You can find the interface description of your function in the upper section of your
programming view.
157
TIA Portal Module 004
® A binary output signal is needed for controlling the conveyor motor. For this reason, we
first create local output tag #Conveyor_motor_manual_mode of the "Bool" type. Enter
comment "Control of the conveyor motor in manual mode" for the parameter.
® Add parameter #Manual_mode_active as the input interface under Input and confirm the
entry with the Enter key or by exiting the entry field. Data type "Bool" is assigned
automatically. This will be retained. Next, enter the associated comment "Manual mode
activated".
158
TIA Portal Module 004
® For purposes of program documentation, assign the block title, a block comment and a
helpful network title for Network 1.
(® Block title: Motor control in manual mode ® Network 1: Control of the conveyor motor
in manual mode)
® You can see a list of instructions you can use in the program on the right side of your
programming window. Under ® Basic instructions ® Bit logic operations, find function –
[=] (Assignment) and use a drag-and-drop operation to move it to Network 1 (green line
appears, mouse pointer with + symbol).
159
TIA Portal Module 004
(® Conveyor_motor_manual_mode)
160
TIA Portal Module 004
(® Manual_mode_active)
® The input of the assignment block will also be logically combined with other parameters
by an AND logic operation. To do this, first click the input of the block to which
#Manual_mode_active is already connected, so that the input line has a blue background.
161
TIA Portal Module 004
® Click the icon in your logic toolbar to insert an AND logic operation between the
#Manual_mode_active tag and your assignment block.
® Double-click the second input of the & logic operation <??.?> and enter the letter "P" in
the field that appears in order to see a list of available tags starting with "P".Click the
#Pushbutton_manual_mode tag and apply with ® Enter.
Note: When assigning tags in this way, there is a risk of a mix-up with the global tags from the
tag table. The previously presented procedure using drag and drop from the interface
description should therefore be used preferentially.
162
TIA Portal Module 004
® To ensure that the output can only be controlled when the enable conditions are met and
the safety shutoff is not active, the #Enable_OK and #Safety_shutoff_active input tags
are logically combined with the AND logic operation. To do this, click twice on the yellow
® Add input tags #Enable_OK and #Safety_shutoff_active to your newly created inputs of
the AND block.
clicking .
163
TIA Portal Module 004
® Under "General" in the properties of the block, you can change the "Language" to LAD
(Ladder Logic) (®Properties ® General ® Language: LAD)
164
TIA Portal Module 004
165
TIA Portal Module 004
® Assign Network 1 the name "Control conveyor tracking forward in manual/jog mode"
® Use drag-and-drop to move your "MOTOR_MANUAL [FC1]" function onto the green line
in Network 1.
166
TIA Portal Module 004
® A block with the interface you defined and connections EN and ENO are inserted in
Network 1.
® To insert an AND before input parameter "Enable_OK", select this input and insert the
167
TIA Portal Module 004
® Click the yellow star of the AND block to add another input (® ).
® To connect the block to the global tags from "Tag_table_sorting_station", we have two
options:
® Either select the "Tag_table_sorting_station" in the project tree and use drag-and-drop to
move the desired global tag from the Details view to the interface of FC1
(® Tag_table_sorting_station ® Details view. ® -SO2 ® Manual_mode_active)
168
TIA Portal Module 004
® Or, enter the starting letters (e.g. "-S") of the desired global tag for <??.?> and select the
global input tag "-S0" (%I0.2) from the displayed list (® Manual_mode_active ® -S ®
-S0).
® Insert the other input tags "-S3", "-K0", "-B1", "-S4" and "-A1" and insert output tag "-Q1"
(%Q0.0) at output "Conveyor_motor_manual_mode".
® Negate the querying of input tags "-S0", "-S4" and "-A1" by selecting them and clicking
169
TIA Portal Module 004
® Connect your function as shown here. You obtain the following result in the FBD
(Function Block Diagram) programming language.
170
TIA Portal Module 004
® The result in the LAD (Ladder Logic) programming language has the following
appearance.
click the "Program blocks" folder and select the icon for compiling in the menu
(® ® Program blocks ® ).
171
TIA Portal Module 004
® The "Info", "Compile" area shows which blocks were successfully compiled.
(® ).
172
TIA Portal Module 004
Note: The monitoring here is signal-related and controller-dependent. The signal states at the
terminals are indicated with TRUE or FALSE.
173
TIA Portal Module 004
® The "MOTOR_MANUAL" [FC1] function called in the "Main [OB1]" organization block can
be selected directly for "Open and monitor" after right-clicking (® "MOTOR_MANUAL"
[FC1] ® Open and monitor).
174
TIA Portal Module 004
the call environment can be selected using the icon (® ® Call environment ®
OK)
175
TIA Portal Module 004
8 Checklist
No. Description Completed
176
Training Curriculum
177
TIA Portal Module 005
Table of contents
1 Goal .................................................................................................................................................. 179
2 Prerequisite....................................................................................................................................... 179
3 Required hardware and software ..................................................................................................... 179
4 Theory............................................................................................................................................... 180
4.1 Operating system and application program .............................................................................. 180
4.2 Organization blocks................................................................................................................... 180
4.3 Process image and cyclic program processing......................................................................... 182
4.4 Functions ................................................................................................................................... 183
4.5 Function blocks and instance data blocks................................................................................. 183
4.6 Global data blocks..................................................................................................................... 184
4.7 Library-compatible code blocks................................................................................................. 185
4.8 Programming languages ........................................................................................................... 186
5 Task .................................................................................................................................................. 187
6 Planning ............................................................................................................................................ 187
6.1 EMERGENCY STOP ................................................................................................................ 187
6.2 Automatic mode - Conveyor motor............................................................................................ 188
7 Structured step-by-step instructions ................................................................................................. 188
7.1 Retrieve an existing project ....................................................................................................... 188
7.2 Create a new tag table .............................................................................................................. 189
7.3 Create new tags within a tag table ............................................................................................ 191
7.4 Import "Tag_table_sorting_station" ........................................................................................... 192
7.5 Create function block FB1 "MOTOR_AUTO" for the conveyor motor in automatic mode ........ 194
7.6 Define the interface of FB1 "MOTOR_AUTO" .......................................................................... 195
7.7 Program FB1: MOTOR_AUTO.................................................................................................. 197
7.8 Program organization block OB1 – Control of the forward belt tracking in automatic mode .... 204
7.9 The result in the LAD (Ladder Logic) programming language has the following appearance. . 208
7.10 Save and compile the program ................................................................................................. 209
7.11 Download the program .............................................................................................................. 209
7.12 Monitor program blocks............................................................................................................. 210
8 Checklist ........................................................................................................................................... 213
178
TIA Portal Module 005
BASICS OF FB PROGRAMMING
1 Goal
In this chapter, you will get to know the basic elements of a control program – the
organization blocks (OBs), functions (FCs), function blocks (FBs) and data blocks
(DBs). In addition, you will be introduced to library-compatible function und function block
programming. You will get to know the Function Block Diagram (FBD) programming
language and use it to program a function block (FB1) and an organization block (OB1).
2 Prerequisite
This chapter builds on the hardware configuration of SIMATIC S7 CPU1516F-3 PN/DP.
However, other hardware configurations that have digital input and output cards can be used.
2 SIMATIC STEP 7
Professional (TIA
1 Engineering station
Portal) as of V1X
4 Ethernet connection
Control panel
3 SIMATIC S7-1500 controller
179
TIA Portal Module 005
4 Theory
4.1 Operating system and application program
Every controller (CPU) contains an operating system, which organizes all functions and
processes of the CPU that are not associated with a specific control task. The tasks of the
operating system include the following:
- Performing a warm restart
- Updating the process image of the inputs and outputs
- Cyclically calling the user program
- Detecting interrupts and calling interrupt OBs
- Detecting and handling errors
- Managing memory areas
The operating system is an integral component of the CPU and comes pre-installed.
The user program contains all functions that are necessary for executing your specific
automation task. The tasks of the user program include the following:
- Checking the basic requirements for a warm restart using startup OBs
- Processing of process data, i.e. activation of output signals as a function of the input
signal states
- Reaction to interrupts and interrupt inputs
- Error handling during normal program execution
180
TIA Portal Module 005
Startup routine
ON (Run)
OB 100 Warm
restart ...
Cyclic program
processing Interrupt-driven
Cycle program processing
OB 1
OB 10 ... 17
OB 56
Interruption
Interrupt ...
Table 1 gives a couple of examples of start events for a SIMATIC S7-1500, their possible OB
number(s) and the default system reaction in the event the organization block is not present in
the controller.
181
TIA Portal Module 005
PIQ
Last instruction
Note: The time the CPU needs for this sequence is called cycle time. This depends, in turn,
on the number and type of instructions and the processor performance of the controller.
182
TIA Portal Module 005
4.4 Functions
Functions (FCs) are logic blocks without memory. They have no data memory in which
values of block parameters can be stored. Therefore, all interface parameters must be
connected when a function is called. To store data permanently, global data blocks must be
created beforehand.
A function contains a program that is executed whenever the function is called from another
code block.
Functions can be used, for example, for the following purposes:
- Math functions – that return a result dependent on input values.
- Technological functions – such as individual controls with binary logic operations.
A function can also be called several times at different points within a program.
Organization block
Main [OB1]
183
TIA Portal Module 005
Function blocks are always executed when called from another code block. A function block
can also be called several times at different points within a program. This facilitates the
programming of frequently recurring complex functions.
A call of a function block is referred to as an instance. Each instance of a function block is
assigned a memory area that contains the data that the function block uses. This memory is
made available by data blocks created automatically by the software.
It is also possible to provide memory for multiple instances in one data block in the form of a
multi-instance. The maximum size of instance data blocks varies depending on the CPU. The
tags declared in the function block determine the structure of the instance data block.
Figure 4: Function block and instance with call from organization block Main [OB1]
184
TIA Portal Module 005
Function_10
Global DB
Access for all blocks
(DB_Global)
Function_11
185
TIA Portal Module 005
186
TIA Portal Module 005
You can thus use simple instructions, for example, to control binary outputs, evaluate edges
and execute jump functions in the program.
Program elements such as IEC timers and IEC counters provide complex instructions.
The empty box serves as a placeholder in which you can select the required instruction.
Enable input EN (enable)/ Enable output ENO (enable output) mechanism:
- An instruction without EN/ENO mechanism is executed independent of the signal state at
the box inputs.
- Instructions with EN/ENO mechanism are only executed if enable input "EN input has
signal state "1". When the box is processed correctly, enable output "ENO" has signal
state "1". As soon as an error occurs during the processing, the "ENO" enable output is
reset. If enable input EN is not connected, the box is always executed.
5 Task
The following functions of the sorting station process description will be planned, programmed
and tested in this chapter:
- Automatic mode - Conveyor motor
6 Planning
The programming of all functions in OB1 is not recommended for reasons of clarity and
reusability. The majority of the program code will therefore be moved into functions (FCs) and
function blocks (FBs). The decision on which functions is to be moved to the FB and which is
to run in OB 1 is planned below.
187
TIA Portal Module 005
Output
BOOL Control of the conveyor motor in automatic
Conveyor_motor_automatic_mode
mode
Static
BOOL Memory used for start/stop automatic mode
Memory_automatic_start_stop
The Memory_automatic_start_stop is latched with Start but only if the reset conditions are not
present.
The Memory_automatic_start_stop is reset if Stop is present or safety shutoff is active or
automatic mode is not activated (manual mode).
The Conveyor_motor_automatic_mode output is controlled when
Memory_automatic_start_stop is set and the enable conditions are met.
188
TIA Portal Module 005
® The next step is to select the target directory where the retrieved project will be stored.
Confirm your selection with "OK". (® Target directory ® OK)
189
TIA Portal Module 005
190
TIA Portal Module 005
® Change the address to %Q0.0 (Q 0.0) by entering this directly or by clicking the drop-
down arrow to open the Addressing menu, changing the operand identifier to Q and
confirming with Enter or by clicking the check mark. (® %I0.0 ® Operand identifier ® Q
® )
® Enter the "Conveyor motor M1 forwards fixed speed" comment for the tag.
® Add a new Q2 tag in line 2. TIA Portal has automatically assigned the same data type as
in line 1 and has incremented the address by 1 to %Q0.1 (Q0.1). Enter the comment
"Conveyor motor M1 backwards fixed speed".
191
TIA Portal Module 005
® Select the desired symbol table (e.g. in .xlsx format) and confirm the selection with
"Open".
(® SCE_EN_020-100_Tag_table_sorting_station… ® Open)
® When the import is finished, you will see a confirmation window and have an opportunity
to view the log file for the import. Click ® OK.
192
TIA Portal Module 005
® You can see that some addresses have been highlighted in orange. These are duplicate
addresses and the names of the associated tags have been numbered automatically to
avoid confusion.
® Delete the duplicate tags by selecting the lines and pressing the Del key on your
keyboard or by selecting "Delete" in the shortcut menu.
® You now have a complete symbol table of the digital inputs and outputs in front of you.
Save your project under the name 032-100_FCProgramming.
193
TIA Portal Module 005
® Rename your new block to: "MOTOR_AUTO", set the language to FBD and keep
automatic assignment of the number. Select the "Add new and open" check box. You are
then taken automatically to your created function block in the project view.Click "Add".
194
TIA Portal Module 005
® You can find the interface description of your function block in the upper section of your
programming view.
® A binary output signal is needed for controlling the conveyor motor. For this reason, we
first create local output tag #Conveyor_motor_automatic_mode of the "Bool" type. Enter
the comment "Control of the conveyor motor in automatic mode" for the parameter.
® Add parameter #Automatic_mode_active as the input interface under Input and confirm
the entry with the Enter key or by exiting the entry field. Data type "Bool" is assigned
195
TIA Portal Module 005
automatically. This will be retained. Next, enter the associated comment "Automatic mode
activated".
The conveyor is started and stopped with pushbuttons. We therefore need a "Static" tag
as a memory. Under Static, add tag #Memory_automatic_start_stop and confirm the entry
with the Enter key or by exiting the entry field. Data type "Bool" is assigned automatically.
This will be retained. Enter the associated comment "Memory used for start/stop
automatic mode". (® Memory_automatic_start_stop ® Bool ® Memory used for
start/stop automatic mode)
® For purposes of program documentation, assign the block title, a block comment and a
helpful network title for Network 1.
196
TIA Portal Module 005
® You can see a list of instructions you can use in the program on the right side of your
programming window. Under ® Basic instructions ® Bit logic operations, find function
197
TIA Portal Module 005
symbol .
(® Conveyor_motor_automatic_mode)
® Click the icon in your logic toolbar to insert an AND logic operation before your
assignment block.
198
TIA Portal Module 005
® Use drag-and-drop to move input parameter #Enable_OK onto the second input of the &
® Use drag-and-drop to move the Set/reset flip-flop function from the list of
instructions under ® Basic instructions ® Bit logic operations onto the first input of the &
operation .
199
TIA Portal Module 005
® The SR flip-flop requires a memory tag. For this, use drag-and-drop to move static
® The #Memory_automatic_start_stop will be set with input tag #Start. Click twice on the
S input of the SR flip-flop <??.?> and enter "Start" in the field that appears in order to see
a list of available tags starting with "Start".Click the #Start tag and apply with ® Enter.
200
TIA Portal Module 005
Note: When assigning tags in this way, there is a risk of a mix-up with the global tags from the
tag table. The previously presented procedure using drag and drop from the interface
description should therefore be used preferentially.
® Multiple conditions are to be able to stop the conveyor. An OR block is therefore needed
at the R1 input of the SR flip-flop. First, click the R1 input of the SR flip-flop so that the
input line has a blue background.
201
TIA Portal Module 005
® The OR block has 2 inputs initially. In order to logically combine an additional input tag,
click the yellow star of the OR block.
clicking .
202
TIA Portal Module 005
® Under "General" in the properties of the block, you can change the "Language" to LAD
(Ladder Logic) (®Properties ® General ® Language: LAD)
203
TIA Portal Module 005
204
TIA Portal Module 005
® Assign Network 1 the name "Control conveyor tracking forward in automatic mode"
® Use drag-and-drop to move your "MOTOR_AUTO [FB1]" function block onto the green
line in Network 1.
205
TIA Portal Module 005
® The instance data block for this call of FB1 is created automatically. Assign a name and
apply it with OK. (® MOTOR_AUTO_DB1 ® OK)
® A block with the interface you defined, the instance data block and connections EN and
ENO are inserted in Network 1.
® To insert an AND before input parameter "Enable_OK", select this input and insert the
® To connect the block to the global tags from "Tag_table_sorting_station", we have two
options:
206
TIA Portal Module 005
® Either select the "Tag_table_sorting_station" in the project tree and use drag-and-drop to
move the desired global tag from the Details view to the interface of FC1 ( ®
Tag_table_sorting_station ® Details view. ® S0 ® Automatic_mode_active)
® Or, enter the starting letters (e.g. "S") “-S”of the desired global tag for <??.?> and select
the global input tag "-S0" (%I0.2) from the displayed list. (® Automatic_mode_active ® S
® -S0)
® Insert the other input tags "-S1", "-S2", "-K0", "-B1" and "-A1" and insert output tag "-Q1"
(%Q0.0) at output "Conveyor_motor_automatic_mode".
207
TIA Portal Module 005
® Negate the querying of input tags "-S2" and "-A1" by selecting them and clicking .
(® -S2 ® ® -A1 ® )
7.9 The result in the LAD (Ladder Logic) programming language has
the following appearance.
208
TIA Portal Module 005
click the "Program blocks" folder and select the icon for compiling in the menu
(® ® Program blocks ® ).
® The "Info", "Compile" area shows which blocks were successfully compiled.
(® ).
209
TIA Portal Module 005
210
TIA Portal Module 005
Note: The monitoring here is signal-related and controller-dependent. The signal states at the
terminals are indicated with TRUE or FALSE.
® The "MOTOR_AUTO" [FB1] function block called in the "Main [OB1]" organization block
can be selected directly for "Open and monitor" after right-clicking (® "MOTOR_AUTO"
[FB1] ® Open and monitor).
211
TIA Portal Module 005
multiple times is to be monitored, this can be performed using the icon. There are two
alternatives available for specifying the call environment: using the call environment or
212
TIA Portal Module 005
8 Checklist
No. Description Completed
213
Training Curriculum
214
TIA Portal Module 006
Table of contents
1 Goal .................................................................................................................................................. 216
2 Prerequisite....................................................................................................................................... 216
3 Required hardware and software ..................................................................................................... 216
4 Theory............................................................................................................................................... 217
4.1 Instances and multi-instances in SIMATIC S7-1500 ................................................................ 217
4.1.1 Instance data blocks/single instances .............................................................................. 217
4.1.2 Multi-instances .................................................................................................................. 218
5 Planning ............................................................................................................................................ 219
5.1 Automatic mode - Conveyor motor with time function .............................................................. 219
6 Structured step-by-step instructions ................................................................................................. 219
6.1 Retrieve an existing project ...................................................................................................... 219
6.2 Addition of an IEC timer TP to FB1 "MOTOR_AUTO" ............................................................. 221
6.3 Update the block call in the organization block ........................................................................ 226
6.4 Save and compile the program................................................................................................. 227
6.5 Download the program ............................................................................................................. 228
6.6 Monitor program blocks ............................................................................................................ 229
7 Checklist ........................................................................................................................................... 231
215
TIA Portal Module 006
2 Prerequisite
This chapter builds on the FB programming with the SIMATIC S7 CPU1516F-3 PN/DP. You
can use the following project for this chapter.
2 SIMATIC STEP 7
Professional (TIA
1 Engineering station
Portal) as of V13
4 Ethernet connection
Control panel
3 SIMATIC S7-1500 controller
216
TIA Portal Module 006
4 Theory
4.1 Instances and multi-instances in SIMATIC S7-1500
The call of a function block is referred to as an instance. An instance is assigned to every call
of a function block and serves as a data memory. It stores the actual parameters and the static
data of the function block.
The tags declared in the function block determine the structure of the instance data block.
Use of single instances and multi-instances
You can assign instances as follows:
Call as a single instance:
- A separate instance data block for each instance of a function block
Call as a multi-instance:
- One instance data block for several instances of one or more function blocks
The following figure shows the control of two motors using one function block FB10 and two
different data blocks:
The different data for the individual motors, such as speed, acceleration time and total
operating time, are saved in the instance data blocks DB10 and DB11.
OB1
DB11
Call of FB10 with FB10
instance DB11 Instance DB for
for control of Standard block second call with
Motor 2 with motor data for Motor 2
program
Note: Some commands, such as timers and counters, react like function blocks. When these
are called, they also require an assigned memory area, e.g. in the form of an instance data
block.
217
TIA Portal Module 006
4.1.2 Multi-instances
You may want to limit the number of data blocks used for instances or this may be necessary
due to lack of memory in the utilized CPU.
If other function blocks, timers, counters, etc. that already exist will be called in a function
block in your user program, you can call these other function blocks without separate (i.e.,
additional) instance DBs.
Simply select ‘Multi-instance’ for the call options:
Notes: Multi-instances enable a called function block to store its data in the instance data
block of the calling function block.
This allows you to concentrate the instance data in one instance data block and thus make
better use of the number of DBs available.
Incidentally, this is always required when the calling block is to remain available for reuse as a
standard block.
Example of multi-instances:
The following figure shows two calls of an IEC_Timer of type TP (pulse) within a function
block.
The different data for the two counters is stored as different multi-instances in the instance
data block DB1 of the calling function block FB1.
OB1
DB1
Call FB1 with FB1 (Instance DB for
instance DB1 FB1)
Call IEC_Timer #Timer1
as multi-instance of type IEC_Timer
#Timer1
Static tag
#Timer1
Call IEC_Timer IEC_Timer
as multi-instance #Timer2 #Timer2
#Timer2 IEC_Timer as of type IEC_Timer
multi-instance
218
TIA Portal Module 006
5 Planning
The IEC timer is programmed as an addition to the MOTOR_AUTO [FB1] function block from
the "032-200_FBProgramming.zap13" project. This project must be retrieved in order to add
the IEC timer TP (latching pulse). A multi-instance will be created as a memory for the timer.
219
TIA Portal Module 006
® The next step is to select the target directory where the retrieved project will be stored.
Confirm your selection with "OK". (® Target directory ® OK)
220
TIA Portal Module 006
® Insert another network at the beginning of the "MOTOR_AUTO [FB1]" function block by
selecting the ® "block title" and then clicking the ® icon for "Insert network".
221
TIA Portal Module 006
® Add helpful information to the block comment and the network title of "Network 1:".
® On the right side of your programming window, you will see the timer functions in the list
of instructions. Under ® Basic instructions ® Timer operations, find function
(Generate pulse) and use a drag-and-drop operation to move it to Network 1 (green line
appears, mouse pointer with + symbol).
222
TIA Portal Module 006
® The timer function requires a memory. Here, this memory is made available within the
instance data block by the function block without the creation of a new instance data
block. Select the ®"Multi-instance" option for this. Enter a name for the multi-instance
and confirm with ® "OK". (® Multi-instance ® IEC_Timer_overrun ® OK)
® As a result, a tag structure of "Static" type suitable for TP Timer will be created in the
interface description.
Note: A multi-instance can only be used for programming within a function block because
static tags are only available there.
223
TIA Portal Module 006
224
TIA Portal Module 006
® The entry of 2s is converted automatically to the IEC-Time format suitable for the IEC
timer and is shown as constant "T#2s".
® Now move output "Q" from tag structure "IEC_Timer_overrun" onto input "CLK" of
negative edge "N_TRIG" in Network 2. This will replace the #Sensor_end_of_conveyor
input tag previously entered there and the conveyor will be stopped by a negative edge of
the IEC_Timer_overrun pulse.
225
TIA Portal Module 006
226
TIA Portal Module 006
®" " icon for "Update inconsistent block calls". This will add the
® To save your project, select the button in the menu. To compile all blocks,
click the "Program blocks" folder and select the icon for compiling in the menu
(® ® Program blocks ® ).
227
TIA Portal Module 006
® The "Info", "Compile" area shows which blocks were successfully compiled.
(® )
228
TIA Portal Module 006
Note: The monitoring here is signal-related and controller-dependent. The signal states at the
terminals are indicated with TRUE or FALSE.
229
TIA Portal Module 006
® The "MOTOR_AUTO" [FB1] function block called in the "Main [OB1]" organization block
can be selected directly for "Open and monitor" after right-clicking, thereby allowing the
program code in the function block with the TP Timer to be monitored.
(® "MOTOR_AUTO" [FB1] ® Open and monitor)
230
TIA Portal Module 006
7 Checklist
No. Description Completed
231
Training Curriculum
232
TIA Portal Module 007
Table of contents
1 Goal.......................................................................................................................234
2 Prerequisite ...........................................................................................................234
3 Required hardware and software ..........................................................................234
4 Theory ...................................................................................................................235
4.1 Fault diagnostics and hardware faults ...................................................................................... 235
4.2 Hardware diagnostics ............................................................................................................... 235
4.3 Diagnostics for program blocks ................................................................................................ 236
5 Task ......................................................................................................................237
6 Planning ................................................................................................................237
6.1 Online interface......................................................................................................................... 237
7 Structured step-by-step instructions ......................................................................238
7.1 Retrieve an existing project ...................................................................................................... 238
7.2 Download the program ............................................................................................................. 238
7.3 Go online................................................................................................................................... 240
7.4 Online & diagnostics of the SIMATIC S7 controller .................................................................. 243
7.5 Online/offline comparison ......................................................................................................... 250
7.6 Monitor and modify tags ........................................................................................................... 253
7.7 Force tags ................................................................................................................................. 256
7.8 Checklist ................................................................................................................................... 259
233
TIA Portal Module 007
2 Prerequisite
This chapter builds on the hardware configuration of SIMATIC S7 CPU1516F-3 PN/DP.
However, other hardware configurations that have digital input and output cards can be used.
2 SIMATIC STEP 7
Professional (TIA
1 Engineering station Portal) as of V1X
4 Ethernet connection
Control panel
3 SIMATIC S7-1500 controller
234
TIA Portal Module 007
4 Theory
2. The CPU is in faulty RUN mode. The green RUN LED lights up and other indicator LEDs
light up or flash on the CPU, power supply unit, IO modules or bus modules.
In this case, a fault may have occurred in the IO devices or power supply.
A visual check is performed initially to narrow down the fault area. The indicator LEDs on the
CPU and IO devices are evaluated. The diagnostic data of the faulty IO and bus modules are
read from the hardware diagnostics. In addition, a fault analysis can be performed using a
watch table on the programming device.
235
TIA Portal Module 007
236
TIA Portal Module 007
5 Task
The following diagnostic functions will be shown and tested in this chapter:
- Diagnostic symbols in the online view of the TIA Portal
- Device diagnostics with module status
- Offline/online comparison
- Monitoring and modifying tags
- Forcing tags
6 Planning
The diagnostic functions will be performed using a finished project as an example.
A project in the TIA Portal that was previously downloaded to the controller should be open for
this.
In our case, after starting the TIA Portal, a previously created project will be retrieved from the
archive and downloaded to the associated controller.
Afterwards, you can start implementing the diagnostic functions in the TIA Portal.
Figure 3: Go online
237
TIA Portal Module 007
® The next step is to select the target directory where the retrieved project will be stored.
Confirm your selection with "OK". (® Target directory ® OK)
238
TIA Portal Module 007
® Select the correct interfaces and click "Start search". (® "PN/IE" ® Selection of the
network adapter of the PG/PC ® Direct at slot ‘1 X1‘® "Start search")
Once "Scan and information retrieval completed" appears, click "Load". (® "Load")
® Before downloading can be started, other actions may have to be set (highlighted in pink).
Click "Load" again. (® "Load“).
239
TIA Portal Module 007
® After loading, first select the "Start all" check box under Action.
7.3 Go online
® To get started with the diagnostic functions, we will select our controller ("PLC_1") and
click "Go online". (® PLC_1 ® Go online)
240
TIA Portal Module 007
® Once the online connection to the "PLC_1" controller is established, the CPU can be
started or stopped with the following buttons . Diagnostic information in the form
of symbols will already be available in the project tree and in the diagnostics window.
® The diagnostic symbols in the project tree show a comparison status representing the
online/offline comparison of the project structure.
Symbol Meaning
Folder contains objects whose online and offline versions are different (only in the
project tree)
Online and offline versions of the object are different
Object only exists online
Object only exists offline
Online and offline versions of the object are the same
241
TIA Portal Module 007
® The graphical representation and device information window show the various operating
states of the CPU or communication processors (CPs).
STARTUP
HOLD
DEFECT
® The graphical representation and Device overview window display the operating states of
the various modules, CPU, or CP using the following symbols.
Symbol Meaning
The connection to a CPU is currently being established.
The CPU is not accessible at the set address.
The type of CPU configured and type of CPU actually present are
incompatible.
During the establishment of the online connection to a protected CPU, the
password dialog was terminated without input of the correct password.
No fault
Maintenance required
Maintenance demanded
Fault
242
TIA Portal Module 007
® The status of ports and Ethernet cables can be diagnosed in the Network view and
Topology view.
® The following table shows the possible colors and their respective meaning.
Color Meaning
No fault or maintenance required
Maintenance demanded
Communication error
® A CPU operator panel, the cycle time and the memory utilization are displayed in the
Online tools on the right side. Switch the CPU to RUN here. (® RUN)
243
TIA Portal Module 007
® The working area window contains general information about the CPU. (® General)
244
TIA Portal Module 007
® Next you receive information about the cycle time of the executed program.
(® Cycle time)
245
TIA Portal Module 007
® Information about the display is also available for the CPU 1516F. (® Display)
® The network settings and the status of the PROFINET interfaces [X1] and [X2] can also
be displayed.
246
TIA Portal Module 007
® In "Assign IP address" under Functions, you can assign the IP address to a controller.
However, this is only possible when no hardware has been downloaded to the CPU.
® Under "Set time", you can set the time of the CPU.
® Under "Firmware update", you can update the firmware of the PLC or the display.
247
TIA Portal Module 007
® Under "Assign name", you can assign a PROFINET device name to the configured field
devices on PROFINET. The device name of the CPU cannot be changed here. It can only
be changed by downloading a modified hardware configuration.
® Under "Reset to factory settings", you can restore the factory settings for the CPU. After
restoring the factory settings, the CPU configuration and the program must be imported
again from the inserted memory card. Therefore, the memory card must be formatted
before the restoring the factory settings.
248
TIA Portal Module 007
® The online connection should be disconnected again before the next chapter.
® The TIA Portal is now back in offline mode. The orange-colored bars and the diagnostic
symbols are no longer displayed.
249
TIA Portal Module 007
Save the "MOTOR_MANUAL [FC1]" block, but do NOT download it to the controller.
250
TIA Portal Module 007
® If, for example, block differences are indicated , first select the block involved. You can
® The selected offline/online block will be compared in the code block comparison. A
detailed description of the difference is shown in the comparison result.
251
TIA Portal Module 007
® An action can be selected for the block involved in the Compare editor.
Either the "MOTOR_MANUAL" block will be downloaded from the programming device to
the controller and overwritten there or the "MOTOR_MANUAL" block will be imported
from the controller and overwritten in the TIA Portal.
® After the upload, there are no more differences. You should now save your project again
and close the online connection.
252
TIA Portal Module 007
® You can enter individual tags in the table or you can select the
"Tag_table_sorting_station" and the tags to be monitored, and drag them from the Details
view to the watch table.
253
TIA Portal Module 007
® To have all monitoring and modifying functions available for selection, the following
columns can be displayed:
OB 1
At transition to STOP trigger point
254
TIA Portal Module 007
® Next, click "Monitor all values once and now" or "Monitor all values according to
® To modify tags, enter the desired "Modify values". Next, click to "Modify all activated
values once and now" or to "Modify all activated values by Modify with trigger
condition".
® The output becomes active even though the programmed conditions are not met.
Note: If the watch table is closed or the connection to the PLC is lost, all modify commands
become ineffective.
255
TIA Portal Module 007
IO device inputs (e.g., IWxx:P) cannot be modified, although they can be pre-assigned by
the "Force" function.
Unlike with the "Modify" function, values permanently assigned by the "Force" function
cannot be overwritten by the user program.
If you close the force table, the force values are retained. This is not the case with the
"Modify" function.
If the online connection to the CPU is interrupted, the tags assigned with the "Force"
function retain their value.
® To force tags, you must first double-click the force table to open it.
(® Force table)
® Select the “Q1” operand with address %Q0.0 from the list. (® Q1)
® With forcing, the operands are entered with direct IO access (%Q0.0:P).
256
TIA Portal Module 007
Click "Start or replace forcing" . The new force request is transferred to the CPU.
® Forcing is activated and the yellow MAINT LED on the CPU lights up. In addition, an F on
a red background is shown at the top right of the display of the S7-1500.
Note: If the watch table is closed or the connection to the PLC is lost, forcing remains active,
and the yellow FRCE LED on the CPU continues to be lit.
® If you want to ‘Stop forcing’, simply click "Stop forcing" , and confirm the next dialog
with "Yes".
Forcing is stopped and the yellow MAINT LED on the CPU goes out.
® If there is already a force request in the controller, this is indicated by the symbol in
the watch table.
257
TIA Portal Module 007
® If there is already a force request in the controller, it can also be displayed and stopped
via the online device view. For this, you need to right-click the CPU in online mode of the
device view and select "Update and display forced operands".
® The force table with the current force requests will now be displayed and you can stop
258
TIA Portal Module 007
7.8 Checklist
No. Description Completed
6 Watch_table_1 created.
Tags (-S0 / -S3 / -K0 / -B1 / -S4 / -A1 / -Q1) entered in watch
7
table.
Switch on conveyor motor forwards by modifying the output
8
(-Q1 = 1) in watch table.
Switch off conveyor motor forwards by modifying the output
9
(-Q1 = 0) in watch table.
259
Training Curriculums
Siemens Automation Cooperates with Education | 05/2017
260
TIA Portal Module 008
Table of contents
261
TIA Portal Module 008
2 Prerequisite
This chapter builds on the hardware configuration of the SIMATIC S7 CPU1516F-3 PN/DP.
However, other hardware configurations can be used.
2 SIMATIC STEP 7
Professional (TIA
1 Engineering station
Portal) as of V13
4 Ethernet connection
Control panel
3 SIMATIC S7-1500 controller
262
TIA Portal Module 008
4 Theory
4.1 System diagnostics: Automated creation of error messages
In the TIA Portal, the diagnostics of devices and modules is collectively referred to as system
diagnostics. The monitoring functions are automatically derived from the hardware
configuration.
All SIMATIC products have integrated diagnostic functions which you can use to detect and
remedy faults. The components automatically signal a possible disruption of operation and
provide additional detailed information. Undesired downtimes can be minimized with plant-
wide diagnostics.
The following states are monitored by the system in the running plant:
- Device failure
- Pull/plug error
- Module fault
- IO access error
- Channel fault
- Parameter assignment error
- Failure of the external auxiliary voltage
263
TIA Portal Module 008
Figure 1: Web server of the CPU 1516F-3 PN/DP with alarm text from the system diagnostics
Note: Make sure that you protect the CPU from manipulation and unauthorized access
through the use of different methods (e.g., limiting network access, using firewalls).
Figure 2: Display of the CPU 1516F-3 PN/DP with alarm text from the system diagnostics
264
TIA Portal Module 008
5 Task
The following advanced diagnostic functions will be shown and tested in this chapter:
- Configuration of web server of the CPU 1516F-3 PN/DP
- Configuration of display of the CPU 1516F-3 PN/DP
- Create hardware fault and system error alarms with the system diagnostics
- Display alarms via the web server of the CPU 1516F-3 PN/DP
- Display alarms via the integrated display of the CPU 1516F-3 PN/DP
6 Planning
The diagnostic functions will be performed using a finished project as an example. A project in
the TIA Portal that was previously downloaded to the controller should be open for this. In our
case, once you have started the TIA Portal, you will retrieve a previously created project that
was archived and download it to the associated controller.
You can then configure the web server, the display and the system diagnostics in the TIA
Portal. To test the system diagnostics, we will disconnect the monitored analog output module
from its supply voltage.
265
TIA Portal Module 008
® The next step is to select the target directory where the retrieved project will be stored.
Confirm your selection with "OK".
(® Target directory ® OK)
® Select the CPU and choose the 'Web server' menu item in the properties.
(® CPU_1516F ® Properties ® Web server)
266
TIA Portal Module 008
® Activate the web server on this module and confirm the security note.
(® Activate web server on this module ® OK)
® Leave the check mark for 'Enable automatic update', and select the security settings
of the 'Everybody' user. Enable this user to carry out all possible actions and accept your
settings.
(® ® )
Notes: You can also create multiple users here with different authorizations. These users then
require a password.
267
TIA Portal Module 008
® In the 'Watch tables' menu item, the 'Watch table_Cylinder' can now be entered in the
web server.
(®Watch table_Cylinder ® )
268
TIA Portal Module 008
® User-defined web pages will not be created here. For reasons of plant safety / security,
we will enable only PROFINET interface_1 for access to the web server.
(® Enabled web server access ® PROFINET interface_1)
269
TIA Portal Module 008
® In the 'Watch tables' menu item, the 'Watch table_Cylinder' can now be entered in the
display.
(®Watch table_Cylinder ® )
270
TIA Portal Module 008
Notes: The indicated alarm class is important so that it can be selected in the alarm windows
of the operator panel (e.g., TP1500, TP700, etc.).
7.5 Activate the diagnostics of the power supply for the analog
output module and download the PLC
® Once the web server, display and system diagnostics have been configured in the
controller, we also activate the diagnostics for the supply voltage for the analog output
module. The controller can then be selected and downloaded together with the created
program.
(® Device configuration ® AQ 4xU/I ST_1 ® Output 0 – 3 ® Outputs ® Channel 0 ®
271
TIA Portal Module 008
® Before downloading can be started, other actions may have to be selected. Click 'Load'
again.
(® override all ®Load)
272
TIA Portal Module 008
® After loading, first select the "Start all" check box and click 'Finish'.
(® Start all ® Finish)
® The power supply of the analog output module is via terminals 41-44 of the supply
element. Remove this supply element, as shown here, from the front connector to trigger
an error message. Result: the red ERROR LED on the CPU is lit and an error message is
triggered. The following pages describe where and how you can view this error message.
273
TIA Portal Module 008
® The error message can now be checked in the 'Alarm display' under 'Diagnostics'.
(® Diagnostics ® Alarm display)
274
TIA Portal Module 008
® On the displayed web page, we first select the language and then click 'ENTER'.
(® English ® ENTER)
® On the 'Home Page' we see general information about the PLC and its status.
(® Home Page)
275
TIA Portal Module 008
® Hardware, Firmware Version and Serial number are displayed besides other information
under 'Diagnostics'.
(® Diagnostics)
276
TIA Portal Module 008
® Under 'Diagnostics Buffer' we see descriptive information for all events in the CPU. Event
information is recorded in a circular buffer. The most recent alarm is displayed in the top
line.
(® Diagnostics Buffer)
® The status of the individual modules of our SIMATIC S7-1500 is displayed with additional
details in the 'Module Information' view.
(® Module Information)
277
TIA Portal Module 008
® The alarm texts generated in the CPU 1516F-3 PN/DP are available in 'Alarms'.
(® Alarms)
Note: Here we see the failure of the supply voltage for the digital input module with activated
diagnostic error interrupt.
® Details about communication settings and communication errors are displayed under
'Communication'.
278
TIA Portal Module 008
279
TIA Portal Module 008
® Devices that are connected to the individual ports of the CPU 1516F-3 PN/DP and the
addresses of these devices can be displayed under 'Topology'. There are various views
for this. In the case of larger network structures, the entire network structure of a plant
can be displayed and faulty connections shown in the status, provided this function is
supported by the individual components.
(® Topology)
280
TIA Portal Module 008
® 'Tag tables' that are linked with the web server, such as the 'Watch table_Cylinder', can
also be displayed.
(® Tag tables ® Watch table_Cylinder)
281
TIA Portal Module 008
® Individually created pages for the visualization and also for operator control of processes
would be seen under 'Customer pages'. (® Customer pages)
® Data can be stored directly on the memory card in the CPU or loaded from there using
the 'Filebrowser'. (® Filebrowser)
282
TIA Portal Module 008
® This means, for example, that you can read and edit the log files written by the CPU
without having to use the TIA Portal. (® DataLogs)
283
TIA Portal Module 008
7.10 Checklist
284
Training Curriculum
285
TIA Portal Module 009
Table of contents
1 Goal .................................................................................................................................................. 287
2 Prerequisite....................................................................................................................................... 287
3 Required hardware and software ..................................................................................................... 288
4 Theory............................................................................................................................................... 289
4.1 Analog signals .......................................................................................................................... 289
4.2 Measuring transducers ............................................................................................................. 289
4.3 Analog modules – A/D converter .............................................................................................. 289
4.4 Data types of the SIMATIC S7-1500 ........................................................................................ 290
4.5 Reading/outputting analog values ............................................................................................ 291
4.6 Normalizing analog values........................................................................................................ 292
5 Task .................................................................................................................................................. 292
6 Planning ............................................................................................................................................ 292
6.1 Analog control of the conveyor speed ...................................................................................... 292
6.2 Technology diagram ................................................................................................................. 293
6.3 Reference list ............................................................................................................................ 293
7 Structured step-by-step instructions ................................................................................................. 295
7.1 Retrieve an existing project ...................................................................................................... 295
7.2 Create the "MOTOR_SPEEDCONTROL" function .................................................................. 296
7.3 Configuration of the analog output channel.............................................................................. 303
7.4 Expand the tag table to include analog signals ........................................................................ 304
7.5 Call the block in the organization block .................................................................................... 305
7.6 Save and compile the program................................................................................................. 307
7.7 Download the program ............................................................................................................. 308
7.8 Monitor program blocks ............................................................................................................ 308
8 Checklist ........................................................................................................................................... 310
286
TIA Portal Module 009
2 Prerequisite
This chapter builds on the chapter IEC Timers and Counters with the SIMATIC S7 CPU1516F-
3 PN/DP. You can use the following project for this chapter, for example: 032-300 IEC Timers
and Counters.zap13
287
TIA Portal Module 009
2 SIMATIC STEP 7
Professional (TIA
1 Engineering station
Portal) as of V13
4 Ethernet connection
Control panel
3 SIMATIC S7-1500 controller
288
TIA Portal Module 009
4 Theory
4.1 Analog signals
In contrast to a binary signal, which can assume only two signal states (“Voltage present +24
V” and “Voltage not present 0 V”), analog signals can assume any value within a defined
range. A typical example of an analog sensor is a potentiometer. Depending on the position of
the knob, any resistance can be set, up to the maximum value.
0V +10V
+10 V
289
TIA Portal Module 009
1: Analog value
2. Digital value
With 8 bits you have 256 individual ranges, while 11 bits provide a resolution of 2048
individual ranges.
0A/0V 20mA/10V
10 V: 2048 = 0.0048828
à Voltage differences of <5 mV can be
11-bit detected
2048
290
TIA Portal Module 009
Note: The 'INT' and 'REAL' data types play a large role in analog value processing. This is
because read-in analog values exist as 16-bit integers in the 'INT' format, and in order to
ensure exact further processing only 'REAL' floating-point numbers should be used due to
rounding errors in the case of 'INT'.
Each analog value (“channel”) occupies one input or output word. The format is ‘Int’, an
integer.
The addressing of input and output words conforms to the addressing in the device overview.
For example:
Here, the address of the first analog input would be %IW 64, that of the second analog input
%IW 66, that of the third analog input %IW68, that of the fourth analog input %IW70, that of
the fifth analog input %IW72, that of the sixth analog input %IW74, that of the seventh analog
input %IW 76 and that of the eighth analog input %IW78.
The address of the first analog output would be %QW64, that of the second analog output
%QW66, that of the third analog output %QW 68 and that of the fourth analog output %QW70.
291
TIA Portal Module 009
The analog value transformation for further processing in the PLC is the same for analog
inputs and analog outputs.
The digitized value ranges are as follows:
Often, these digitized values still have to be normalized by further processing them in the PLC
in an appropriate manner.
If an analog input value exists as a digitized value in the range +/- 27648, it must usually still
be normalized so that the numerical values correspond to the physical quantities in the
process.
Likewise, the analog output usually results from setting of a normalized value that then still has
to be scaled to the output value +/- 27648.
In the TIA Portal, ready-made blocks or arithmetic operations are used for normalizing and
scaling.
For this to be carried out as exactly as possible, the values for the normalizing must be
converted to the REAL data type to minimize rounding errors.
5 Task
In this chapter, a function for analog control of the conveyor speed will be added to the
program from chapter "SCE_EN_032-300 IEC Timers and Counters".
6 Planning
The analog control of the conveyor speed will be programmed in the
"MOTOR_SPEEDCONTROL" [FC10] function as an expansion of the "SCE_EN_032-300 IEC
Timers and Counters" project. This project must be retrieved from the archive in order to add
this function. The "MOTOR_ SPEEDCONTROL" [FC10] function will be called in the "Main“
[OB1]" organization block and wired. The control of the conveyor motor must be changed
to - Q3 (conveyor motor -M1 variable speed).
292
TIA Portal Module 009
If the speed setpoint is outside the range +/- 50 rpm, the value 0 with data type 16-bit integer
(Int) will be output at the output. The return value of the function (Ret_Val) will then be
assigned the value TRUE (1).
If the speed setting is within the range +/- 50 rpm, this value will first be normalized to the
range 0…1 and then scaled to +/- 27648 with data type 16-bit integer (Int) for output as the
speed manipulated value at the analog output.
The output will then be connected with signal U1 (manipulated value speed of the motor in 2
directions +/- 10V corresponds to +/- 50 rpm).
293
TIA Portal Module 009
I Input Q Output
NC Normally Closed
NO Normally Open
294
TIA Portal Module 009
® The next step is to select the target directory where the retrieved project will be stored.
Confirm your selection with "OK".
(® Target directory ® OK)
295
TIA Portal Module 009
® Select in the next dialog and rename your new block to:
"MOTOR_SPEEDCONTROL". Set the language to FBD and manually assign the number
"10". Select the "Add new and open" check box. Click "OK".
296
TIA Portal Module 009
® Create the local tags with their comments as shown here and change the data type of the
'Return' tag from 'Void' to 'Bool'.
(® Bool)
® Insert an Assignment ' ' in the first network and an 'And' ' in front of it. Then use
drag-and-drop to move the 'Comparator operation' 'Less or equal' from the 'Basic
297
TIA Portal Module 009
® Next use drag-and-drop to move the 'Comparator operation' 'Greater or equal' onto the
® Connect the contacts in Network 1 with the constants and local tags as shown here. The
data types in the comparator operations are automatically adapted to 'Real'.
298
TIA Portal Module 009
® Use drag-and-drop to move the 'Conversion operation' 'NORM_X' into Network 2 in order
to normalize the speed setpoint of +/- 50 rpm to +/- 1.
(® Basic instructions ® Conversion operations ® NORM_X)
® Connect the contacts in Network 2 with the constants and local tags as shown here. The
data types in 'NORM_X' are automatically adapted to 'Real'.
299
TIA Portal Module 009
® Use drag-and-drop to move the 'Conversion operation' 'SCALE_X' into Network 3 in order
to scale the speed setpoint from the normalized +/- 1 onto the range for the analog output
+/- 27468.
(® Basic instructions ® Conversion operations ® SCALE_X)
® Connect the contacts with the constants and local tags in Network 3 as well, as shown
here. The data types in 'SCALE_X' are automatically changed to 'Real' or 'Int'.
300
TIA Portal Module 009
® Insert an Assignment ' ' in the fourth network. Use drag-and-drop to move the 'Move'
command from the 'Move operations' folder under 'Basic instructions' in front of the
Assignment.
® The contacts in Network 4 will now be connected with constants and local tags as shown
here. If the speed setpoint is not within the range +/- 50 rpm, the value '0' is output at the
analog output and the value TRUE is assigned to the return value (Return) of the
"MOTOR_SPEEDCONTROL“ function.
301
TIA Portal Module 009
302
TIA Portal Module 009
® Check the address setting and the configuration of the analog output channel 0.
(® Q address: 64…71 ® Properties ® General ® Output 0 - 3 ® Outputs ® Channel 0
® Output type: Voltage ® Output range: +/- 10 V ® Reaction to CPU STOP: Shutdown)
303
TIA Portal Module 009
® Add the global tags for the analog value processing to the "Tag table_sorting station". An
analog input B8 and an analog output U1 must be added.
(® U1 ® %QW64 ® B8 ® %IW64)
304
TIA Portal Module 009
® Select the block title of OB1 and then click ' ' to insert a new Network 1 in front of the
other networks
(® )
305
TIA Portal Module 009
® Connect the contacts with the constants and global and local tags here as shown.
306
TIA Portal Module 009
® To save your project, select the button in the menu. To compile all blocks,
click the "Program blocks" folder and select the icon for compiling in the menu.
(® ® Program blocks ® )
® The "Info", "Compile" area shows which blocks were successfully compiled.
307
TIA Portal Module 009
(® )
(® Main [OB1] ® )
308
TIA Portal Module 009
309
TIA Portal Module 009
8 Checklist
No. Description Completed
310
Training Curriculum
311
TIA Portal Module 010
Table of contents
1 Goal .................................................................................................................................................. 313
2 Prerequisite....................................................................................................................................... 313
3 Required hardware and software ..................................................................................................... 314
4 Theory............................................................................................................................................... 315
4.1 Data blocks ............................................................................................................................... 315
4.2 Data types of the SIMATIC S7-1500 ........................................................................................ 316
4.3 Optimized blocks ...................................................................................................................... 317
4.4 Download without reinitialization .............................................................................................. 317
5 Task .................................................................................................................................................. 318
6 Planning ............................................................................................................................................ 318
6.1 Global data block for speed control and speed monitoring of the motor.................................. 318
6.2 Technology diagram ................................................................................................................. 318
6.3 Reference list ............................................................................................................................ 319
7 Structured step-by-step instructions ................................................................................................. 320
7.1 Retrieve an existing project ...................................................................................................... 320
7.2 Create the global data block "SPEED_MOTOR"...................................................................... 321
7.3 Access to data of the data block in the organization block....................................................... 325
7.4 Save and compile the program................................................................................................. 329
7.5 Download the program ............................................................................................................. 330
7.6 Monitor/modify values in data blocks........................................................................................ 330
7.7 Initialize setpoints/reset start values ......................................................................................... 331
7.8 Snapshots in data blocks.......................................................................................................... 333
7.9 Expand data block and download it without reinitialization ...................................................... 335
8 Checklist ........................................................................................................................................... 339
312
TIA Portal Module 010
2 Prerequisite
This chapter builds on the chapter Analog Values with the SIMATIC S7 CPU1516F-3 PN/DP.
313
TIA Portal Module 010
2 SIMATIC STEP 7
Professional (TIA
1 Engineering station Portal) as of V1X
4 Ethernet connection
Control panel
3 SIMATIC S7-1500 controller
314
TIA Portal Module 010
4 Theory
4.1 Data blocks
In contrast to logic blocks, data blocks contain no instructions. Rather, they serve as memory
for user data.
Data blocks thus contain variable data that is used by the user program. You can define the
structure of global data blocks as required.
Global data blocks store data that can be used by all other blocks (see Figure 1). Only the
associated function block should access instance data blocks. The maximum size of data
blocks varies depending on the utilized CPU.
Function_10
Global DB
Access for all blocks
(DB_Global)
Function_11
315
TIA Portal Module 010
316
TIA Portal Module 010
The following steps can be performed while the controller is in RUN mode:
1. Activate "Download without reinitialization"
2. Insert newly defined tags in an existing block
3. Download expanded block to the controller
The newly defined tags are initialized. The existing tags retain their current value.
Prerequisite: a memory reserve must have been defined for the block beforehand and the
block with this memory reserve must have downloaded to the CPU.
317
TIA Portal Module 010
5 Task
In this chapter, the program from chapter Analog will be expanded to include a data block that
centrally provides the parameters for the two functions "MOTOR_SPEEDCONTROL“ [FC10]
and "MOTOR_ SPEEDMONITORING“ [FC11].
6 Planning
The data management and setpoint setting for the "MOTOR_SPEEDCONTROL" [FC10] and
"MOTOR_SPEEDMONITORING" [FC11] functions will be carried out using the global data
block "SPEED_MOTOR" [DB2].
This will be added to the "032-500_Analog_Values" project. This project must be retrieved
from the archive beforehand.
In the "Main" [OB1] organization block, the two functions "MOTOR_SPEEDCONTROL" [FC10]
and "MOTOR_SPEEDMONITORING" [FC11] must then be connected with the tags from
global data block "SPEED_MOTOR" [DB2].
6.1 Global data block for speed control and speed monitoring of the
motor
Speed setpoint and actual speed value will be created in Real data format (32-bit floating-point
number) as the first tags in the "SPEED_MOTOR" [DB2] data block. The speed setpoint is
thereby given the start value + 14 U/min
A structure (Struct) 'Positive_Speed' will then be created for monitoring the positive speed
limits.
This structure contains the 2 tags 'Threshold_Error' (start value + 15 rpm) and
'Threshold_Warning' (start value + 10 rpm) in Real data format (32-bit floating-point number)
and the 2 tags 'Error' and 'Warning' in Bool data format (binary number).
The structure (Struct) 'Positive_Speed' will then be inserted again as a copy and renamed to
'Negative_Speed' for monitoring the negative speed limits.
The 'Threshold_Error' tag is given the start value - 16 rpm and the 'Threshold_Warning' tag
the start value - 14 rpm.
318
TIA Portal Module 010
I Input Q Output
NC Normally Closed
NO Normally Open
319
TIA Portal Module 010
® The next step is to select the target directory where the retrieved project will be stored.
Confirm your selection with "OK".
(® Target directory ® OK)
320
TIA Portal Module 010
® Select in the next dialog and rename your new block to: "SPEED_MOTOR". Select
'Global DB' as the type. The number '2' will be automatically assigned. Select the "Add
new and open" check box. Click "OK".
321
TIA Portal Module 010
322
TIA Portal Module 010
® Create the tags for the speed monitoring below the structure as shown here.
323
TIA Portal Module 010
324
TIA Portal Module 010
Note: The use of setpoints is described further below in the step-by-step instructions of the
module.
® Delete the temporary tags in Main [OB1] that are no longer needed. Only the Boolean tag
'Motor_Speed_Control_Ret_Val' is still needed.
(® Delete)
325
TIA Portal Module 010
® Have the "SPEED_MOTOR" [DB2] data block and the "Main" [OB1] organization block
displayed side by side by clicking the ' ' icon to vertically split the editor area.
(® )
® Use drag-and-drop to move the tags needed for the interconnection from the
"SPEED_MOTOR" [DB2] data block onto the connections of the called functions and
function blocks in the "Main" [OB1] organization block. First we move the
'Speed_Actual_Value' tag onto the 'Actual_speed' output of the
"MOTOR_SPEEDMONITORING" [FC11] block.
(® Speed_Actual_Value)
326
TIA Portal Module 010
® Also connect the other contacts in Network 1 with tags from the "SPEED_MOTOR" [DB2]
data block as shown here.
® Connect the contacts in Network 2 with tags from the "SPEED_MOTOR" [DB2] data block
as shown here.
327
TIA Portal Module 010
® Connect the contacts in Network 3 with tags from the "SPEED_MOTOR" [DB2] data block
as shown here.
328
TIA Portal Module 010
® To save your project, click the button in the menu. To compile all blocks,
click the "Program blocks" folder and select the icon for compiling in the menu.
(® ® Program blocks ® )
® The "Info", "Compile" area shows which blocks were successfully compiled.
329
TIA Portal Module 010
(® )
(® SPEED_MOTOR [DB2] ® )
330
TIA Portal Module 010
® In the 'Monitor value' column, the values currently available in the CPU can be monitored.
® If your right-click on one of the values, the 'Modify' dialog for modifying this value opens
(® Modify ® Modify value: 14.0 ® OK)
® The setpoints can be initialized by clicking the ' ' icon. For the tags whose 'Setpoint'
check box is selected , the start value will then be applied as the current value.
(® )
331
TIA Portal Module 010
(® )
332
TIA Portal Module 010
® If you click the ' ' icon, a snapshot of the monitored values can be taken in order to
apply these values as start values or to transfer them back to the CPU later
(® ).
® Alternatively, values from the snapshot can be applied by clicking the ' ' icon for all
values or by clicking the ' ' icon for the start values only. Only the setpoints are needed
here in most cases
(® )
333
TIA Portal Module 010
® To transfer data captured in the snapshot back to the CPU, you must click ' '.
(® )
334
TIA Portal Module 010
® If you want to overwrite all setpoints with the start values, you can initiate this by clicking '
'. The values in the CPU for which the 'Setpoint' check box was not selected are
thereby retained.
(® )
you must ' ' and then open the properties of the data block.
335
TIA Portal Module 010
® Select the 'Optimized block access' check box in the properties under 'General',
'Attributes'.
(® General ® Attributes ® Optimized block access)
® Assign a 'Retentive memory reserve' to the data block for 'Download without
reinitialization'.
(®Download without reinitialization ® Retentive memory reserve ® 10 bytes ® OK)
® Download your "SPEED_MOTOR" [DB] data block to the controller again and select '
'.
(®SPEED_MOTOR [DB] ® ® )
336
TIA Portal Module 010
® Then click the ' ' icon to activate download without reinitialization and confirm the
safety prompt with 'OK'.
(® ® OK)
337
TIA Portal Module 010
® If you click ' ' to monitor the block again, you will see that the monitored values have
not been overwritten with the start values.
(® )
338
TIA Portal Module 010
8 Checklist
No. Description Completed
339
Training Curriculum
360
TIA Portal Module 011
Table of contents
1 Goal .................................................................................................................................................. 363
2 Prerequisite....................................................................................................................................... 363
3 Required hardware and software ..................................................................................................... 363
4 Theory............................................................................................................................................... 365
4.1 Process visualization ................................................................................................................ 365
4.2 SIMATIC HMI Panel TP700 Comfort........................................................................................ 365
4.2.1 Device description ............................................................................................................ 365
4.2.2 Memory concept ............................................................................................................... 367
4.2.3 Settings on the Touch Panel TP700 Comfort/Start Center .............................................. 369
4.2.4 Setting the date and time.................................................................................................. 370
4.2.5 Setting transfer properties and assigning the IP address................................................. 371
4.2.6 Calibrating the touch panel and rebooting........................................................................ 373
4.3 WinCC Advanced V1X programming software (TIA Portal V1X) ............................................. 374
4.3.1 Project............................................................................................................................... 375
4.3.2 Hardware configuration..................................................................................................... 375
4.3.3 Schedule the hardware ..................................................................................................... 376
4.3.4 Planning the screen structure ........................................................................................... 376
4.3.5 Planning of the screen structure ....................................................................................... 377
4.3.6 Basic settings for WinCC Advanced in the TIA Portal ...................................................... 378
4.3.7 Resetting the SIMATIC HMI Panel TP700 Comfort and setting the IP address .............. 379
4.3.8 WinCC user interface........................................................................................................ 381
4.3.9 Project tree........................................................................................................................ 382
4.3.10 Details view....................................................................................................................... 382
4.3.11 Menu bar and buttons ....................................................................................................... 382
4.3.12 Work area ......................................................................................................................... 383
4.3.13 Tools ................................................................................................................................. 383
4.3.14 Properties window ............................................................................................................ 384
4.3.15 Other tabs ......................................................................................................................... 384
5 Task .................................................................................................................................................. 385
6 PlanningProcess visualization .......................................................................................................... 385
6.1 Program description for the sorting station with speed control and speed monitoring of the
motor 385
6.2 Technology diagram ................................................................................................................. 386
6.3 Reference list ............................................................................................................................ 387
7 Structured step-by-step instructions ................................................................................................. 388
7.1 Retrieving an existing project.................................................................................................... 388
7.2 Adding a SIMATIC HMI Panel TP700 Comfort......................................................................... 389
7.3 HMI wizard for the TP700 Comfort Panel................................................................................. 391
7.4 Device configuration of the TP700 Comfort Panel ................................................................... 395
361
TIA Portal Module 011
362
TIA Portal Module 011
2 Prerequisite
This chapter builds on the chapter "Global data blocks with SIMATIC S7 CPU 1516F-3
PN/DP". You can use the following project for this chapter, for example: Data Block.
363
TIA Portal Module 011
2 SIMATIC STEP 7
Professional (TIA Portal)
as of V13
1 Engineering station
3 WinCC Advanced
(TIA Portal) as of V13
6 Ethernet connection
6 Ethernet connection
364
TIA Portal Module 011
4 Theory
4.1 Process visualization
Production processes are becoming more and more complex and greater demands are being
placed on the functionality of machinery and plants. For this reason, the operator needs a
high-performance tool to control and monitor production plants. An HMI (Human Machine
Interface) system represents the interface between the human being (operator) and the
process (machine/plant). The controller has the actual control over the process. There is
therefore an interface between the operator and WinCC (on the HMI panel) and an interface
between WinCC and the controller.
SIMATIC HMI Comfort Panels and WinCC undertake the following tasks:
• Representing processes with a clear screen structure
The process is represented on the HMI device. If, for example, a state changes in the process,
the display is updated on the HMI device. The process can be represented clearly structured
on multiple screens.
• Operating processes
The operator can operate the process using the graphical user interface. The operator can, for
example, enter a setpoint for the controller or start a motor.
• Outputting alarms
If critical process states occur in the process, an alarm is triggered automatically; for example,
when a specified limit is exceeded.
• Logging process values and alarms
The HMI system can log alarms and process values. You can document the process history in
this way. As a result, you still have access to older production data even at a later time.
• Documenting process values and alarms
The HMI system can print out alarms and process values as reports. For example, you can
output the production data at the end of a shift.
• Managing process parameters and machine parameters in recipes
The HMI system can store parameters for processes and machines in recipes. You can
transfer these parameters, for example, from the HMI device to the controller in a single step
in order to change production to another product type.
• User management
Certain rights can be granted to the devices and the possible operator inputs can be limited for
certain users.
365
TIA Portal Module 011
The WinCC Advanced V1X (TIA Portal V1X) software is required for configuration and
programming. This software is included in the product package of the SCE Trainer Packet
"SIMATIC HMI TP700 COMFORT PANEL"!
Notes:
Because all devices in this series have similar functions, it would also be possible to work
through the chapters of this document with a different device version in this series.
WinCC Advanced Runtime Simulation can also be used to represent the TP700 Touch
Panel on the PC (included in the product package of the SCE Trainer Package SIMATIC
HMI TP700 COMFORT PANEL).
③ Touchscreen display
Rear view of the TP700 Comfort
366
TIA Portal Module 011
① Rating plate
② Slots for SD memory cards
Interfaces of the TP700 Comfort
367
TIA Portal Module 011
Memory card
The following data is stored here:
– Logs
– Backups
– Recipes
You can use commercially available memory cards in "SD(IO / HC)" or "MMC" format as the
memory card. For reasons of data consistency, use of a SIMATIC HMI Memory Card as the
memory card is recommended.
System memory card
The system memory card is part of the service concept of the HMI devices and helps to
reduce downtimes.
When you activate the service concept, all data is transferred from the internal memory of the
HMI device to the system memory card. In this way, if the HMI device fails, the system
memory card can simply be inserted into the replacement device.
Only the SIMATIC HMI Memory Card with 2 GB or more memory is permitted as the system
memory card. Other memory cards are not recognized by the HMI device as a system
memory card.
Slots for memory card and system memory card
368
TIA Portal Module 011
® Select ® "Settings" in the "Start Center" directly after switching on the voltage supply
and the start of the panel.
Note: The selection of "Settings" must occur fast enough, and before the automatic
"Start" of Runtime.
369
TIA Portal Module 011
® Select from the icons in order to set the date and time.
® Set the date, current time and time zone.® Close and confirm the dialog with "OK".
370
TIA Portal Module 011
® Select "Automatic". The transfer will then be started from the WinCC Advanced software.
® Select Ethernet "PN/IE" as the transfer channel. Press the " " button ® to
set the IP address on the panel and to make or check the network settings.
Notes:
To set the MPI or PROFIBUS address on the panel, select the MPI or PROFIBUS
interface and then press the Properties button to make or check the bus settings.
The settings in the Transfer Settings window have nothing to do with the connection
settings in the project. This means, for example, that data can be transferred between the
TP700 panel and WinCC Advanced using the Ethernet interface, and communication
between the panel and the SIMATIC S7 controller can take place via the PROFIBUS
interface.
In our example, data is transferred between the TP700 panel and WinCC Advanced and
communication takes place between the panel and the SIMATIC S7 controller via the
Ethernet interface.
371
TIA Portal Module 011
® In the "IP Address" tab, select the "Specify an IP address" option and set the IP address
and subnet mask. ® Close and confirm the dialog with "OK".
372
TIA Portal Module 011
® Select the icon in order to open the basic settings of the touch panel.
® Select the "Touch" tab ® Start the calibration there with "Recalibrate".
® Follow the instructions on the touch panel and press on the center of the target as
accurately as possible.
® To conclude the calibration operation, tap on the touch display of the panel again.
373
TIA Portal Module 011
With WinCC Advanced V1X you have the following functions for creating HMI (Human
Machine Interface) systems:
- Configuration and parameter assignment of the hardware
- Specification of communication and creation of a connection to a PLC
- Creation and design of screens with hierarchical structure
- Creation of internal and external variables
- Creation of alarms and alarm views
- Creation of logs and display of logs in the form of trends and tables
- Creation of recipes and recipe views
- Creation and printing of reports
- Creation of user-defined functions with Visual Basic Scripting
- Testing, commissioning and servicing with operational/diagnostic functions
- Remote operation via the optional WinCC Smart Server
374
TIA Portal Module 011
4.3.1 Project
To implement a solution for an automation and visualization task, you create a project in the
TIA Portal. A project in the TIA Portal contains the configuration data for the configuration and
networking of devices as well as the programs and the configuration of the visualization.
Visualization
Central structure
Actuators/sensors
Figure 2: Example of hardware configuration with centralized and distributed structures and process
visualization
The hardware configuration enables the downloading of automation and visualization solutions
to the automation system and access to the connected signal modules by the controller.
375
TIA Portal Module 011
376
TIA Portal Module 011
The screen structure should be chosen to optimally support navigation by the user through the
information distributed among the screens for operation and monitoring of the process.
The following questions can aid you in this:
Which mental model of the process should be observed for the information display?
Which data belong together?
Which data belong in which order?
Which data belong to which actions/processes?
Is there cross-action data and the like?
Which data are key data, which are supplementary data?
® Uniform division of the overall screen into work information, status or system information
and controller information
® Use alignment as a design principle (align numbers, column headings same as column
content)
® Make effective use of a maximum of 30 – 40% of the available space: place as little
information as possible and as much as necessary
® Use codings sparingly (for example, color, bold text, brightness, shape, outline, pattern,
flashing)
® Subdivide numbers: Subdivide numbers with more than 4 digits in groups of 2, 3 or 4 (for
example, 66 234)
377
TIA Portal Module 011
® Under ® "Visualization" in "Settings", select the desired default settings for the
appearance of the user interface.
378
TIA Portal Module 011
4.3.7 Resetting the SIMATIC HMI Panel TP700 Comfort and setting the IP
address
The SIMATIC HMI Panel TP700 Comfort can be reset directly in the TIA Portal. A new IP
address can also be assigned to the panel here.
To do so, select the Totally Integrated Automation Portal, which is opened here with a double-
click.
( ® TIA Portal V1X)
® Then, select ®"Online & Diagnostics" and open ®"Project View".
® In the project tree, select the network adapter of your computer under ® "Online
access". If you click ® "Update accessible devices" here, you will see the IP address (if
previously set) or the MAC address (if IP address not yet assigned) of the connected
SIMATIC HMI Comfort Panel ® Select ® "Online & Diagnostics" here.
379
TIA Portal Module 011
® To reset the panel, select the ® "Reset to factory settings" function and click ® "Reset".
Note: For resetting to factory settings, "Runtime" should not yet be started in the panel
and the "Start Center" should be displayed.
® Confirm the prompt asking if you really want to reset the module with ® "Yes".
® Before you can assign the IP address, you must wait until the panel has finished
resetting. Afterwards, you must select ® "Update accessible devices" and ® "Online &
diagnostics" of your panel again. To assign the IP address, select the ® "Assign IP
address" function here. Enter the following IP address here, for example: ® IP address:
192.168.0.10 ® Subnet mask 255.255.255.0. Click ® "Assign IP address" and this new
address will be assigned to your SIMATIC HMI Panel TP700 Comfort.
380
TIA Portal Module 011
® If the IP address was not successfully assigned, you will receive a message in the ®
"Info" window under ® "General".
Note: The IP address of the SIMATIC HMI Panel TP700 Comfort can also be set using
he Windows CE operating system of the panel.
381
TIA Portal Module 011
382
TIA Portal Module 011
4.3.13 Tools
The Tools window contains a selection of objects is provided that you can insert into your
screens, such as graphic objects and operator controls. In addition, the Tools window contains
graphics with preassembled graphic objects and collections of faceplates.
Objects are moved to the working area via "drag and drop".
383
TIA Portal Module 011
384
TIA Portal Module 011
5 Task
In this chapter, process visualization will be added to the program from chapter Data_Blocks.
This will enable you to better monitor the process flow and operate the process more
effectively.
6 PlanningProcess visualization
A Touch Panel TP700 Comfort is to be used for the process visualization.
The programming device, a SIMATIC S7-1500 controller and the Touch Panel TP700 Comfort
are interconnected via the Ethernet interface.
The basic configuration is to be performed using the wizard in the TIA Portal V1X. All system
screens are to be created in the process.
In an overview screen "Overview of sorting station", the process will be represented by the
conveyor and sensors. Conveyor speed and the count of plastic workpieces will also be
displayed here.
In this screen, it is also to be possible to select the operating mode, start and stop in automatic
mode and reset the counter.
The actual speed of the motor will be graphically displayed in another screen titled "Motor
Speed". The setpoint speed can also be specified here.
The "Plastic Magazine" will be created in a first step.
An alarm line, date/time and the plant states "Emergency Stop ok/triggered", "Main switch
ON/OFF" and "Automatic started/stopped" are to be displayed in the header of all screens.
The footer contains a button that can be used to return to the start screen and a button to exit
Runtime.
The alarm system is also to be configured.
System events are to be displayed on the panel and the CPU and limit violations of the motor
speed and the main switch monitored.
The alarms will be displayed in the alarm line of the header and shown automatically in alarm
windows when errors/warnings occur.
Remote control of the Touch Panel TP700 Comfort is activated via the web server.
6.1 Program description for the sorting station with speed control
and speed monitoring of the motor
The "MOTOR_AUTO" [FB1] function block controls a conveyor in automatic mode.
The Memory_automatic_start_stop is latched with the Start_command but only if the reset
conditions are not present.
The Memory_automatic_start_stop is to be reset if a Stop_command is pending or safety
shutoff is active or automatic mode is not activated from the visualization.
The Conveyor_motor_automatic_mode output is activated when
Memory_automatic_start_stop is set, the enable conditions are met and
Memory_conveyor_start_stop is set.
To save energy, the conveyor should only run when a part is present.
For this reason, the Memory_conveyor_start_stop is set when Sensor_chute_occupied signals
a part and reset when Sensor_end_of_conveyor produces a negative edge or safety shutoff is
active or automatic mode is not activated (manual mode).
385
TIA Portal Module 011
Because the Sensor_end_of_conveyor is not able to be mounted directly at the end of the
conveyor, signal stretching of the Sensor_end_of_conveyor signal is programmed.
The magazine for plastic holds only five parts. For this reason, the parts will be counted at the
end of the conveyor. When the magazine contains five parts, automatic mode is to be
stopped. After the magazine has been emptied, automatic mode will be restarted with the
Start_command once the counter has been reset from the visualization.
The speed setting is made at an input of the "SPEED_MOTORCONTROL" [FC10] function in
revolutions per minute (range: +/- 50 rpm).
First, the function first checks for correct entry of the speed setpoint in the range +/- 50 rpm.
If the speed setpoint is outside the range +/- 50 rpm, the value 0 will be output at the speed
manipulated value output. The return value of the function (Ret_Val) will be assigned the value
TRUE (1).
If the speed setting is within the range +/- 50 rpm, this value will first be normalized to the
range 0…1 and then scaled to +/- 27648 with data type 16-bit integer (Int) for output as the
speed manipulated value at the analog output.
In the "SPEED_MOTORMONITORING" [FC11] function, the actual value will be made
available to B8 as an analog value and queried at an input of the
"SPEED_MOTORMONITORING" [FC11] function.
The actual speed value will be scaled to revolutions per minute (range: +/- 50 rpm) and made
available at an output.
The following four limits can be specified for the block inputs in order to monitor them in the
function:
Speed > SPEED_MOTOR_monitoring_error_max
Speed > SPEED_MOTOR_monitoring_warning_max
Speed < SPEED_MOTOR_monitoring_warning_min
Speed < SPEED_MOTOR_monitoring_error_min
If a high or low limit is violated, the value TRUE (1) is assigned to the corresponding output bit.
If a fault is present, the protective tripping of the "MOTOR_AUTO" [FB1] function block is to be
tripped.
The speed setpoint and the actual speed value as well as the positive and negative error and
warning limits are created in the data block "SPEED_MOTOR" [DB2], as are the error and
warning bits.
The setpoint and actual value of the counter for the plastic parts will be specified and
displayed in the global data block "MAGAZINE_PLASTIC" [DB3]. These values are
interconnected with the "MOTOR_AUTO" [FB1] function block using an input for the setpoint
setting and an output for the actual value display.
386
TIA Portal Module 011
I Input O Output
NC Normally Closed
NO NO Normally Open
387
TIA Portal Module 011
® The next step is to select the target directory where the retrieved project will be stored.
Confirm your selection with "OK".
( ® Target directory … ® OK)
388
TIA Portal Module 011
389
TIA Portal Module 011
® Now, select the device version as follows: ® "HMI" ® "SIMATIC Comfort Panel" ® "7"
Display" ®"TP700 Comfort" and the correct order number of your panel, here, for
example, ® 6AV2 124-0GC01-0AX0
® Enter "Panel TP700 Comfort" as the device name and ® select the check box "Start
390
TIA Portal Module 011
® In order to connect your panel to the CPU, select the "Ethernet" interface.® Confirm
your selection by clicking " "
® Under "Screen layout" you can change the default background color of your panel. ®
Select the "Page header" check box with screen title "Date/time" and "Logo".®
Confirm your selection by clicking " ".
391
TIA Portal Module 011
® In the "Alarms" section, you can specify the alarms that are to be displayed in a window.
Select all 3 alarm types (with the option "Top alarm line" for unacknowledged
alarms) ® Confirm your selection by clicking " ".
392
TIA Portal Module 011
® The "Screen navigation" section shows the screen structure with the screen names of
the last created project, in which the start screen is the first screen shown on the left.
® By clicking a screen name, you can easily assign a new name ® By clicking , you
can insert new pictures in the hierarchy ®By clicking " ", you can delete
selected screens.
® Use this method to create the screen structure shown below with the corresponding
screen names. ® Confirm your selection by clicking " ".
® In the "System screens" section, you can select previously preset views for system
functions and automatically insert them. ®Enable all system screens with "Select all"
® Confirm your selection by clicking " ".
393
TIA Portal Module 011
® In the "System buttons" section, you will find the four freely selectable buttons for Exit
(Runtime), Log on , Language and Start screen . You can place these
buttons on the provided button areas "Left", "Bottom" or "Right" using drag-and-drop.
® Enable only the "Button area" "Bottom". ® Insert the button for the "Start screen"
on the left and the button for Runtime "Exit" on the right. ® Confirm your selection
394
TIA Portal Module 011
® In order to configure our panel, select "Panel TP700 Comfort" in the project tree and
double-click it to open its "Device configuration".
395
TIA Portal Module 011
® In the ® "Properties" under General, open the ® "PROFINET interface [X1]" menu
command and select the ® "Ethernet addresses" entry there.
Note: The subnet mask was previously set in the settings of the CPU 1516F and is
applied automatically to the panel.
® To obtain an overview of the assigned addresses within a project, you can click the ® "
" icon in the ®"Network view". If you click ® , the "HMI connection"
between the CPU and panel that you previously created in the wizard will be displayed.
396
TIA Portal Module 011
7.5 Compiling the CPU and panel and saving the project
® To compile all blocks, click the "CPU_1516F" folder and select the icon for compiling
in the menu. To compile the panel, click the "Panel TP700 Comfort" folder and select the
icon for compiling in the menu. You can save your project by clicking the
button in the menu.
® The 'Info' area then indicates whether compiling was successful or whether warnings or
errors occurred.
397
TIA Portal Module 011
® Many objects such as the screen change buttons were already created by the wizard.
The text filed in the center of the screen is to be removed by right-clicking it and
selecting ® "Delete" in the displayed dialog.
398
TIA Portal Module 011
® From Tools, select ® "Graphic display" under ® "Basic objects". The mouse pointer
changes so that you can now draw an area for displaying a graphic in the work area.
® You can double-click the graphic display area to have its properties displayed. Select the
399
TIA Portal Module 011
Note: There are four sub-items for the properties of the objects.
® Select the "Foerderband_Conveyor.bmp" graphic for the display and click ® "Apply".
Note: The generated graphic is stored in the "Languages & Resources" path under
"Project graphics".
® Position the graphic with the mouse in such a way that the positions and sizes shown
below are entered ® under "Layout" ® in the properties. Select the ® "Fit graphic to
object size" option to adapt the size.
400
TIA Portal Module 011
401
TIA Portal Module 011
® The connection to the tag in the PLC has already been created in the "Properties" of the
IO field under "General", "Process". The "Display format" is set to "Decimal". Now, all
you have to do is change the "Format pattern" to ® "s999.99" and the "Type" of the field
to ® "Output".
Note: The format pattern s999.99 means that the display will include three places in front
of the decimal point two places after the decimal point and a sign.
402
TIA Portal Module 011
® Under "Layout" in the "Properties", change ® "Position & Size" as illustrated here so that
the IO field will be displayed below the conveyor motor.
® For the description, use drag-and-drop to insert a ® "Text field" before and after
the IO field from ® "Basic objects" in "Tools". Type ® "Actual speed value" and ® "rpm"
there.
® Next, select the three objects ® IO field ® text field "Actual speed value" ® and text
field "rpm" in that order and then click on the ® "Align selected objects on top"
function in the toolbar of the work area. Save your project by clicking .
403
TIA Portal Module 011
® Draw the correctly sized and positioned rectangle with the mouse or set the ® "Position
& Size" under "Layout" in "Properties" as shown here. The sensor will then be displayed
below the designation "-B4".
404
TIA Portal Module 011
® Now change to the "Animation" tab and select "Display" and click
® "Add new animation" .
405
TIA Portal Module 011
® To establish the connection to the global tag in the CPU, select ® "PLC tags" under ®
"CPU_1516F" and below that
the ® "Tag_table_sorting_station". Next, drag the "-B4" tag from the ® "Detail view" to
the "Name" field for the "Tag".
® In the "Appearance" of the "Display", add an area with the value ® "1" (signal state
"High") and change the "Background color" to ® "Green".
As shown in the previous steps, create a display for each of the following sensors:
® "-B1", ® "-B2", ® "-B5", ® "-B6" and ® "-B7".
® Also insert an additional binary display below the motor M1 and connect it to the global
tag ® "-B3". For the description, insert a text field ® "-B3 Motor active" in front of it.
406
TIA Portal Module 011
® The symbol library contains a number of simple and more complex graphic elements.
Under "General" in "Properties", select the "Category" ® "Arrow". Select an arrow
407
TIA Portal Module 011
® Under "Appearance" in "Properties", change the "Style" of the arrow to ® "Solid" and the
"Color" of the "Foreground" to ® "Green".
® Now change to the "Animation" tab and select "Display" and click ® "Add new
animation" .
408
TIA Portal Module 011
® To establish the connection to the global tag in the CPU, select ® "PLC tags" under ®
"CPU_1516F" and below that ® "Tag_table_sorting_station". Next, drag the "-Q3" tag
from the ® "Detail view" to inside the "Tag" field. In addition, select ® "Single bit" as the
type of evaluation.
® Next, duplicate the arrow from the symbol library with all its properties using ®
"Copy" and "Paste".
409
TIA Portal Module 011
Note: If access protection has been activated for the CPU 1516F, the access password
for the panel can also be entered here.
® To access the HMI tags, you must double-click the ® "Default tag table" in the ® "HMI
tags" folder in ® "Panel TP700 Comfort" to open it. All tags created by drag-and-drop
have been entered here.
410
TIA Portal Module 011
® In the default tag table, you can check which tags in the CPU 1516F will be accessed.
You can also made additional settings.
The "Acquisition cycle" of our tags is to be accelerated from 1 second to 100
milliseconds here. To do so, click the ® selection field and select a new acquisition
cycle ® "100 ms" by double-clicking it.
® You can make the settings of other tags using the "Autocomplete" function by selecting
the lower right corner of the first entry with the mouse and dragging over the other
entries.
411
TIA Portal Module 011
® After successful compilation, the complete controller with the created program including
the hardware configuration can be downloaded, as described in the previous modules.
(® )
412
TIA Portal Module 011
® To download the visualization to the panel, proceed in a similar way. Select the ® "Panel
TP700 Comfort [TP700 Comfort]" folder and click the icon
® "Download to device".
® The manager for configuring the connection properties (extended download) opens.
First, the interface must be correctly selected. This happens in three steps.
The ® "Show all compatible devices" check box must then be selected. The search for
413
TIA Portal Module 011
® If your panel is shown in the "Compatible devices in target subnet" list, it must be
selected and the download started.
(® Panel TP700 Comfort ® "Download")
® You first obtain a preview. Confirm the prompt ® "Overwrite all" and continue with ®
"Load".
Note: The symbol should be visible in every line of the "Load preview". You can find
additional information in the "Message" column.
414
TIA Portal Module 011
No. Procedure:
415
TIA Portal Module 011
the process data in the CPU 1516F. To close the simulation, you can select the ®
button for "Exit Runtime" in the application or simply close the window by clicking
®" ".
"OPERATION_HMI".
416
TIA Portal Module 011
® In the "OPERATION_HMI" data block, create the following four tags of data type BOOL:
® "Mode selection", ® "Automatic_Start", ® "Automatic_Stop" and ®
"Reset_Counter_Plastic". The start value of the "Automatic_Stop" tag
is preset with ® "true".
417
TIA Portal Module 011
® The call of the function block "MOTOR_AUTO[FB1]" must be updated in the "Main[OB1]"
block. This is done by clicking the icon ® "Update inconsistent block calls".
418
TIA Portal Module 011
® In network 3 of the "Main[OB1]" block, drag an ® "OR" in front of the input tag ®
"Start_command".
® The second free input of the ® "OR" is connected to the ® "Automatic_Start" tag from
the "OPERATION_HMI" data block.
419
TIA Portal Module 011
® In network 3 of the "Main[OB1]" block, drag an ® "AND" in front of the input tag ®
"Stop_command".
® The second free input of the ® "AND" is connected to the ® "Automatic_Stop" tag from
the "OPERATION_HMI" data block.
420
TIA Portal Module 011
(® CPU_1516F ® ® )
® You download the modified program including the hardware configuration to the CPU
1516F. ( ® )
421
TIA Portal Module 011
® In order to implement a pushbutton that resets the workpiece counter for the plastic
parts, use drag-and-drop to move the ®"Button" object from ® "Elements" in
"Tools" to a location below the plastic parts storage.
422
TIA Portal Module 011
® The functionality must now be configured as a pushbutton. For this, change to the
"Events" menu, select ® "Press" as the event and ® "<Add function>".
® Under "System functions", select "Bit processing" as the function and select ®
"SetBitWhileButtonPressed" there.
® For the process connection, select the ® "Program blocks" of the ® "CPU_1516F" and
the ® "OPERATION_HMI[DB4]" data block there. Then drag the
®"Reset_counter_plastic" tag from the ® "Detail view" into the field for "Tag
(input/output)".
423
TIA Portal Module 011
424
TIA Portal Module 011
® As shown previously in the document, now insert a text ® "Plastic parts counter" above
the button and a display of the ® "Plastic_parts_actual" tag from the
"MAGAZINE_PLASTIC[DB3]" block to the left of the button.
® In order to implement the pushbutton, use drag-and-drop to move the ®"Button" object
from ® "Elements" in "Tools" to a location at the top next to the button for the screen
change.
425
TIA Portal Module 011
® Under "General" in "Properties", change the "Mode" to ® "Graphics and text". To do this,
open the selection dialog for ® "Graphic when button is not pressed" by clicking the
icon.
® Then click the icon for "Create graphic from file" and select the "Pushbutton-Round-
G_Off_256c.bmp" file from the "SCE_EN_042-201_Screens" folder by double-clicking it.
® In exactly the same way, select the "Pushbutton-Round-G_On_256c.bmp" file from the
"SCE_EN_042-201_Screens" folder for the "Graphic when button is pressed".
426
TIA Portal Module 011
Note: The generated graphics are stored in the "Languages & Resources" path under
"Project graphics".
® Under "Layout" in "Properties", adapt the size of the button under ® Position & Size.
® The pushbutton functionality is realized here again as event ® "Press" with "System
function" ® "SetBitWhileButtonPressed". The ® "Automatic_Start" tag from the data
block ® "OPERATION_HMI[DB4]" is used for the process connection.
427
TIA Portal Module 011
® As shown in the last steps, a "button" for the Stop button is inserted. The files
"Pushbutton-Stop_Off_256c.bmp" and "Pushbutton-Stop_On_256c" from the
"SCE_EN_042-201_Screens" folder are used as graphics.
® The functionality as a normally-closed switch is implemented with two events. The first
event is ® "Press" with "System function" ® "ResetBit" and the second event ®
"Release" with "System function" ® "SetBit". The ® "Automatic_Stop" tag from the data
block ® "OPERATION_HMI[DB4]" is used for the process connection in both cases.
428
TIA Portal Module 011
® In order to implement the mode switch, use drag-and-drop to move the ®"Switch"
object from ® "Elements" in "Tools" to a location at the top between the buttons for the
screen change and the Start button.
® Under "General" in "Properties", select the "Show label" ® option. Next, enter the
texts ® "Auto" for the "ON" state and ® "Manual" for the "OFF" state. The ® "Mode
selection" tag from the data block ® "OPERATION_HMI[DB4]" is used for the process
connection.
429
TIA Portal Module 011
® Under "Layout" in "Properties", adapt the size of the mode switch under ®Position &
Size.
(® )
430
TIA Portal Module 011
® You would now like to adapt the screen title to the dimensions specified here under
"Layout" in "Properties" in ® "Position & Size".
® Delete the logo on the left in the header by selecting the ® graphic display for the LOGO
with the right mouse button and clicking ® "Delete".
® In the "Panel TP700 Comfort", open the ® "Text and Graphic lists" folder.
431
TIA Portal Module 011
® Click the icon for "Value 0" to open the selection dialog for the graphics stored under
"Project graphics" in the "Language & Resources" path. Click the icon for "Create
graphic from file" and select the "Warning.bmp" file from the "SCE_EN_042-
201_Screens" folder by double-clicking it. This file is stored in the "Languages &
Resources" path under "Project graphics".
432
TIA Portal Module 011
® The graphic that you want to assign to "Value 1" is already stored in the "Languages &
Resources" path under "Project graphics". After clicking the ® icon, you can select
the ®"Logo of Panel TP700 Comfort" file directly.
433
TIA Portal Module 011
® Now change to the "Text lists" and create the following three text lists:® "Text
list_Emergency stop" ® "Text list_Main switch" and ® "Text list_Automatic". Use the ®
selection "Bit(0,1)" in each case.
® Make the desired assignments in "Text list_Main switch": "Value 0" ® "Main switch OFF"
and ® "Value 1" ® "Main switch ON".
434
TIA Portal Module 011
® Back in "Template_1" for our header, use drag-and-drop to move the ® "Graphic IO
® To establish the connection to the global tag in the CPU, select ® "PLC tags" under ®
"CPU_1516F" and below that ® "Tag_table_sorting_station". Now drag the
® "-A1" tag from the "Detail view" into the "Tag" field In addition, select ® "Bit number
0" as the type of evaluation.
435
TIA Portal Module 011
® Under "Layout" in "Properties", adapt the size of the "Graphic IO field" under ® "Position
& Size".
® To display the status of the EMERGENCY STOP in the header, use drag-and-drop to
move the ® "Symbolic IO field" object from ® "Elements" in Tools to the right of the
"Graphic IO field".
® Under "General" in "Properties", change the "Mode" to ® "Output". Next, open the
selection dialog for ® "Text list" by clicking the icon. Select the "Text list_Emergency
stop" you just created.
436
TIA Portal Module 011
® To establish the connection to the global tag in the CPU, select ® "PLC tags" under ®
"CPU_1516F" and below that ® "Tag_table_sorting_station". Now drag the
® "-A1" tag from the "Detail view" into the "Tag" field and also select ® "Bit number 0"
® Under "Layout" in "Properties", adapt the size of the "Graphic IO field" under ® "Position
& Size".
437
TIA Portal Module 011
® Repeat the preceding steps again for the text lists ® "Text list_Main switch" and ® "Text
list_Automatic" to insert these left of the date and time directly one beneath the other.
® The "Text list_Main switch" is connected using the ® "-K0" tag from
Tag_table_sorting_station".
® Under "Appearance" in "Properties", change the "Color" of the "Background" for ®"Text
list_Main switch" and ® "Text list_Automatic" to ® "Gray".
® For ® "Text list_Main switch" and ® "Text list_Automatic", change to the "Animation"
tab and select "Display" and click ® "Add new animation" .
438
TIA Portal Module 011
® In "Appearance" of both "Symbolic IO fields", add an area with the value ® "1" (signal
state "High") and change the "Background color" to ® "Green".
® The "Text list_Main switch" is connected using the ® "-K0" tag from
Tag_table_sorting_station".
439
TIA Portal Module 011
440
TIA Portal Module 011
® In the default tag table, the "Acquisition cycle" of all tags is also to be accelerated from 1
second to 100 milliseconds here.
® Before the project is downloaded to the CPU and the panel, compile the CPU and panel
® After successful compilation, the complete controller with the created program including
the hardware configuration can be downloaded, as described in the previous modules.
(® )
® To download the visualization to the panel, proceed in a similar way. Select the ® "Panel
TP700 Comfort [TP700 Comfort]" folder and click the icon
® "Download to device".
441
TIA Portal Module 011
® The text field in the center of the screen is to be removed by right-clicking it and
selecting ® "Delete" in the displayed dialog.
® In order to graphically display the actual speed value, use drag-and-drop to move the
® Under "General" in "Properties", change the "Maximum scale value" to ® 50 and the
"Minimum scale value" to ® -50.
442
TIA Portal Module 011
® For the process connection, select the ® "Program blocks" of the ® "CPU_1516F" and
the ® "SPEED_MOTOR[DB2]" data block there. Then drag the ®"Actual speed value"
tag from the ® "Detail view" into the field for "Process tag".
443
TIA Portal Module 011
® Under "Label" in "Properties", select ® "Label". Under "Unit" select ® rpm. Under
"Decimal places", select ® 2.
® Under "Layout" in "Properties", adapt the position and size of the bar under ® "Position
& Size". Above the bar diagram, insert a ® "Text field" for the description with text
® "Actual speed value".
® In order to specify the speed setpoint, move the ®"IO field" object from ®
"Elements" in "Tools" to a location above and to the right of the bar display.
444
TIA Portal Module 011
® Under "General" in "Properties" keep the "Type" as ®"Input/Output" and change the
"Format pattern" to ® s99.99.
® For the process connection, select the ® "Program blocks" of the ® "CPU_1516F" and
the ® "SPEED_MOTOR[DB2]" data block there.
Now drag the ®"Speed setpoint" tag from the ® "Detail view" into the field for "Tag".
445
TIA Portal Module 011
® Under "Layout" in "Properties", adapt the position and size of the IO field under ®
"Position & Size".
® Above the bar diagram, insert a ® "Text field" for the description with text ®
"Speed setpoint".
446
TIA Portal Module 011
® In the default tag table, the "Acquisition cycle" of the newly created
"SPEED_MOTOR_speed setpoint" tag is again changed from 1 second to 100
milliseconds.
® Before the visualization is downloaded to the panel, compile the panel again and save
the project.
® Select the ® "Panel TP700 Comfort [TP700 Comfort]" folder and click the icon®
"Download to device".
7.16 Alarms
When you created the TP700 Comfort Panel using the wizard, you created a pair of alarm
windows at the same time. You should now look these over in more detail.
® You first want to make a pair of settings for the display of alarms in Runtime. To do this,
double-click the® "Runtime settings" folder in ® "Panel TP700 Comfort" to select it.
Under "General" in "Alarms", select ® "Colors of alarm classes". Under "System
events", change ® display duration in seconds to "10". Under "Controller alarms", check
whether the "System diagnostics" check box is selected .
447
TIA Portal Module 011
® In order for the alarm window to be shown in the foreground in every screen, there is a
® "Global screen" in the ® "Screen management" folder in ® "Panel TP700 Comfort".
Open this with a double-click. An alarm window ® "System events" has already been
created in this screen. Under "General" in "Properties", "Pending alarms" of
"System" alarm class are already activated.
® System events will thus automatically be displayed for ten seconds in Runtime.
448
TIA Portal Module 011
® As a second alarm window in the "Global screen" there is ® "Pending alarms". Under
"General" in "Properties", activate "Pending alarms" and "Unacknowledged
alarms". Activate "Errors", "Warnings" and "No Acknowledgment" as alarm
classes.
Note: You will create alarm classes of types "Errors" and "Warnings" in the panel itself in
the following steps. The alarm class of the "No acknowledgment" type is produced
automatically by the settings for the system diagnostics in the CPU 1516F.
449
TIA Portal Module 011
® In addition to the alarm windows there is an ® "Alarm indicator" in the "Global screen".
This is used so that an alarm window that was closed by the user is displayed again.
Under "General" in "Properties", activate the alarm classes "Errors: Pending alarms",
"Errors: Acknowledged", "Warnings: Pending alarms" and "No Acknowledgment:
Pending alarms".
450
TIA Portal Module 011
® Open the "Device configuration" of the "CPU_1516F" and select the ® "System
diagnostics" menu under ® "General" in ® "Properties".
System diagnostics is always activated for devices of the SIMATIC S7-1500 series.
Under ® "Alarm setting", you see which alarm classes are being used. Here, the alarm
class is "No Acknowledgment". These alarm classes are referenced in turn by the HMI
systems in the alarm windows and for the other settings for the alarms.
451
TIA Portal Module 011
® Before the project is downloaded to the CPU and the panel, compile the CPU and panel
again and save the project.
® After successful compilation, the complete controller with the created program including
the hardware configuration can be downloaded, as described in the previous modules.
( ® CPU_1516F ® )
® To download the visualization to the panel, proceed in a similar way. Select the ® "Panel
TP700 Comfort [TP700 Comfort]" folder and click the icon ® "Download to device".
® Alarms for system diagnostics of the CPU 1516F are now automatically displayed in the
alarm window "Pending/Unacknowledged alarms". Details and help texts can be
displayed and alarms can be acknowledged if necessary in this alarm window. If the
alarm window has been closed, it can be displayed again by clicking the displayed
alarm indicator. This example shows a failure of the supply voltage for the
"AQ4xU/I" module.
452
TIA Portal Module 011
® The item ® "HMI alarms" is available in the ® "Panel TP700 Comfort" for configuring
the alarm system and creating individual alarms. Open this with a double-click. The
alarm classes we are using have already been created in the menu command "Alarm
classes" but these can also be changed. For alarm class ® "Warnings", change the
background color for the "Incoming" and "Outgoing" states to ® "Yellow".
® With the menu command "System events", you can have these automatically imported
by clicking ® "Yes".
453
TIA Portal Module 011
® The controller alarms have already been created with the menu command "Controller
alarms".
® You can monitor tags to determine whether they are within limits in "Analog alarms".
Create a new alarm by clicking "Add". For monitoring purposes, select the ® "Default
tag table" in ® "Panel TP700 Comfort" and drag the ®
"SPEED_MOTOR_actual_speed_value" tag that is to be monitored from the ® "Detail
view" into the field for "Trigger tag". Drag the variable
limit®"SPEED_MOTOR_positive_speed_error limit" from the ® "Detail view" into the
field for "Limit".
® Enter the text ® "Error limit exceeded positive motor speed", select the "Alarm class" ®
"Errors" and "Mode" ® "High". Create the three other alarms of alarm classes
"Warnings" and "Errors" shown below in the same way.
454
TIA Portal Module 011
® Before you can create discrete alarms in the panel, you need a global tag with at least
16 bits in the CPU 1516F. You will use this tag to trigger the discrete alarms from the
PLC. In "CPU 1516F", open the data block ® "OPERATION_HMI[DB4]" in the®
"Program blocks" folder and create a global tag ® "Group alarms 01" of data type ®
"Word" there.
455
TIA Portal Module 011
data type ® "Word". In the first network, program a single assignment of the ®
"DiscreteAlarmX0" tag to Bit X0 in the ® "GroupAlarms01" tag.
Note: The "Tag1.%X0" syntax is referred to as Slice access in the TIA Portal. This
enables access to the individual bits of a tag of data type Byte, Word or DWord: If you
need additional information about this, search for the term "Slice" in the online help for
STEP 7 Professional V1X.
® Open the ® "Main[OB1]" block from the "Program blocks" folder and call the ®
"Discrete_alarm_assignment[FC1]" function in ® "Network 4". Connect the input of the
"Discrete_alarm_assignment[FC1]" function to the inverted global tag ®
"-K0" / %I0.1 / Station "ON"(no) from the "Tag_table_sorting_station". Connect the
output of the "Discrete_alarm_assignment[FC1]" function to the global tag ®
"GroupAlarms01" from the data block "OPERATION_HMI[DB4]".
456
TIA Portal Module 011
® Return to ® "HMI alarms" ® "Discrete alarms" in the "Panel TP700 Comfort". Create a
new alarm by clicking ® "Add". Select the ® "GroupAlarms01" tag you just created from
the "OPERATION_HMI[DB4] data block as the "Trigger tag". Enter the text ® "Main
switch OFF" in the "Alarm text" column, select the "Alarm class" ® "Warnings" and
"Trigger bit" ® "0". In the "Trigger address" column, "OPERATION_HMI.
GroupAlarms01.x0" is now displayed.
® The alarm display is also adapted in "Template_1" in the "Screen management" folder.
Under "General" in "Properties", activate ® "Pending alarms". Activate ® "Errors",
® "Warnings" and ® "No Acknowledgment" as alarm classes.
457
TIA Portal Module 011
® Before the project is downloaded to the CPU and the panel, compile the CPU and panel
again and save the project.
® After successful compilation, the complete controller with the created program including
the hardware configuration can be downloaded, as described in the previous modules.
(® CPU_1516F ® )
® To download the visualization to the panel, proceed in a similar way. Select the ® "Panel
TP700 Comfort [TP700 Comfort]" folder and click the icon® "Download to device".
® Analog alarms and discrete alarms for system are now automatically displayed in the
alarm window "Pending/Unacknowledged alarms" and in the "Alarm line". Details and
help texts can be displayed and alarms can be acknowledged if necessary in the alarm
458
TIA Portal Module 011
window. If the alarm window has been closed, it can be displayed again by clicking the
displayed alarm indicator. Various alarm classes appear in different colors.
® To enable remote control, double-click the ® "Runtime settings" in the configuration for
the ® Panel TP700 Comfort to open them. The ® "Start Sm@rtServer" option is
activated for ® "Layout" under "Remote control" and the ® "HTML pages" option is
activated under "Diagnostics".
459
TIA Portal Module 011
® Settings must also be made directly on the panel. Select ® "Settings" in the "Start
Center" directly after switching on the voltage supply and the start of the panel.
Note: The selection of "Settings" must occur fast enough, and before the automatic
"Start" of Runtime.
® Select from the icons in order to make the web server settings.
® With menu command "Web Server", first select the "Start automatically after booting"
option and click on ® "User Administration".
® Assign the administrator password in the "Password" field ® "100", confirm it in the
"Confirm Password" field ® "100" and apply it with ® "Apply".
460
TIA Portal Module 011
® With menu command "Remote", first select the "Start automatically after booting"
option and click ® "Change settings".
® Also assign ® "100" for Password1 and ® "100" for Password2 and put this into effect
with ® "Apply".
461
TIA Portal Module 011
® To start the remote access to your panel, enter the IP address of the in your browser
® "192.168.0.10".
Note: A current installation of Java Runtime Environment is required for secure access to
the web services of the TP700 Comfort Panel.
® Enter the password that was previously set in the panel ® "100".
462
TIA Portal Module 011
® You then have the option of monitoring, and operating the panel remotely and even
changing the settings in Windows CE of the device.
463
TIA Portal Module 011
8 Checklist
No. Description Completed
464
Training Curriculum
465
TIA Portal Module 012
Table of contents
1 Goal .................................................................................................................................................. 467
2 Prerequisite....................................................................................................................................... 467
3 Required hardware and software ..................................................................................................... 467
4 Theory............................................................................................................................................... 468
4.1 Tasks of closed loop controls ................................................................................................... 468
4.2 Components of a control loop................................................................................................... 468
4.3 Step function for analysis of controlled systems....................................................................... 470
4.4 Controlled systems with self-regulation .................................................................................... 471
4.4.1 Proportional system without time delay ............................................................................ 471
4.4.2 Proportional system with time delay ................................................................................. 472
4.4.3 Proportional system with two time delays......................................................................... 473
4.4.4 Proportional system with n time delays ............................................................................ 474
4.5 Systems without self-regulation ................................................................................................ 475
4.6 Basic types of continuous controllers ....................................................................................... 476
4.6.1 The proportional controller (P controller) .......................................................................... 477
4.6.2 The integral controller (I controller)................................................................................... 478
4.6.3 The PI controller................................................................................................................ 479
4.6.4 The derivative controller (D controller) ............................................................................. 480
4.6.5 The PID controller ............................................................................................................. 480
4.7 Controller tuning using the oscillation test ................................................................................ 481
4.8 Controller tuning with Tu-Tg approximation ............................................................................... 482
4.8.1 Tuning the PI controller according to the Ziegler-Nichols method.................................... 482
4.8.2 Tuning the PI controller according to the Chien, Hrones and Reswick method ............... 483
4.9 Digital controllers ...................................................................................................................... 483
5 Task .................................................................................................................................................. 485
6 Planning ............................................................................................................................................ 485
6.1 PID_Compact closed-loop control block................................................................................... 485
6.2 Technology diagram ................................................................................................................. 486
6.3 Reference list ............................................................................................................................ 486
7 Structured step-by-step instructions ................................................................................................. 487
7.1 Retrieve an existing project ...................................................................................................... 487
7.2 Call PID_Compact controller in a cyclic interrupt OB ............................................................... 488
7.3 Save and compile the program................................................................................................. 494
7.4 Download the program ............................................................................................................. 495
7.5 Monitor PID_Compact .............................................................................................................. 496
7.6 PID_Compact pretuning ........................................................................................................... 497
7.7 PID_Compact fine tuning.......................................................................................................... 499
8 Checklist ........................................................................................................................................... 502
466
TIA Portal Module 012
2 Prerequisite
This chapter builds on the chapter Analog Values with the SIMATIC S7 CPU1516F-3 PN/DP.
You can use the following project for this chapter, for example: Analog
2 SIMATIC STEP 7
Professional (TIA
1 Engineering station Portal) as of V1X
4 Ethernet connection
Control panel
3 SIMATIC S7-1500 controller
467
TIA Portal Module 012
4 Theory
4.1 Tasks of closed loop controls
Closed loop control is a process in which the value of a variable is generated and maintained
continuously through an intervention based on measurements of this variable.
This produces an action path that takes place in a closed loop – the control loop – because
the process runs based on measurements of a variable that is, in turn, influenced by itself.
The variable to be controlled is continuously measured and compared with another preset
variable of the same type. Depending on the result of this comparison, an adjustment of the
variable to be controlled to the value of the preset variable is made.
Diagrammatic representation of a
closed loop control
Comparing
Controlling Actuator
element
element
Measuring
device
Setpoint
temperature
Loop controller
YR Y Final Controlled
W Comparing e Controlling Actuator X
element element controlling system
element
r Measuring
device
468
TIA Portal Module 012
469
TIA Portal Module 012
xe(t)
for t < 0
xe(t)
xeo
xeo for t > 0
470
TIA Portal Module 012
xe(t)
Xa(t)
Controlled variable/manipulated
variable:
471
TIA Portal Module 012
472
TIA Portal Module 012
Xa(t)
Tg
Xa
Tu
The system is generated through the reaction-free series connection of two P-T1
systems that have the time constants TS1 and TS2.
Tu Tu Tu
easily still controllable difficult to control
Tg controllable Tg
Tg
With the increasing ratio Tu/Tg, the system becomes less and less controllable.
473
TIA Portal Module 012
Xa(t)
TS
Xa
P-Tn
(P-T1) - Tt
Tt
474
TIA Portal Module 012
After a disturbance, the controlled variable continues increasing steadily without striving for a
fixed final value.
xe(t) xa(t)
xeo
to to
Example: Level control
For a tank with discharge outlet, whose incoming and outgoing flow rates are the same, there
is a constant fill height. If the incoming or outgoing flow rate changes, the liquid level rises or
falls. The level changes faster as the difference between the incoming flow rate and outgoing
flow rate increases.
It is clear from this example that, in practice, the integral action has a limit in most cases. The
controlled variable increases or decreases only until a system-inherent limit value is reached.
A tank runs over or drains dry, pressure reaches the system maximum or minimum, etc.
The figure shows the time response of an I system to a step change in the input variable as
well as the derived block diagram:
ymax
Block diagram
tt00
xmax
Ti
t0
If the step function at the input changes to a function xe(t), then
* Figure from SAMSON Technical Information - L102 Controllers and Controlled Systems,
Edition: August 2000 (http://www.samson.de/pdf_en/l102en.pdf)
475
TIA Portal Module 012
Discrete controllers have several disadvantages, however. For one thing, when large loads such
as large electric motors or cooling units must be switched, high load peaks may occur at switch-
on and overload the power supply, for example. For this reason, these often do not switch
between "Off" and "On" but instead between full power ("full load") and a significantly lower power
of the actuator or final controlling element ("base load"). Still, even with this improvement, a
discrete closed-loop control is unsuitable for numerous applications. Consider an automobile
engine whose speed is discreetly controlled. There would then be nothing between idle and full
throttle. Apart from the fact that it would probably be impossible to properly transfer the forces
from a sudden full-throttle to the road via the tires, such a vehicle would probably be unsuitable
for road traffic.
Continuous controllers are therefore used for such applications. Theoretically, hardly any limits
are placed on the mathematical relationship that establishes the controlling element between the
system error and controller output variable. In practice, however, three classic basic types are
differentiated. These will be described in more detail in the following.
476
TIA Portal Module 012
Metal bellows
Setpoint spring
KP
y = KP · e
477
TIA Portal Module 012
Controlled
variable
Setpoint
Deviation
Actual value
Time
The advantages of this controller type lie, on the one hand, in its simplicity (in the simplest
case, it can be implemented electronically with just a resistor) and, on the other hand, in its
very prompt reaction compared to other controller types.
The main disadvantage of the P controller is its permanent system deviation. That is, the
setpoint is never fully reached even over the long term. This disadvantage as well as the not
yet ideal response speed cannot be minimized to a satisfactory extent through a larger
proportional-action coefficient, because this leads to overshooting by the controller, or in other
words an overreaction. In the worst case, the controller goes into a permanent oscillation in
which the controlled variable is periodically moved away from the setpoint by the controller
itself instead of by the manipulated variable.
The problem of permanent control deviation is best solved by an additional integral controller.
with
How rapidly the manipulated variable increases/decreases depends on the error and the
integral time.
478
TIA Portal Module 012
emax
Block diagram
t1
t2
ymax
t1 t2
PI controllers are often employed in practice. In this combination, one P and one I controller
are connected in parallel.
If properly designed, they combine the advantages of both controller types (stability and
rapidity; no steady-state error), so that their disadvantages are compensated for at the same
time.
P
PI
emax
Block diagram
t1
t2
ymax
Tn
t1 t2
The dynamic behavior is marked by the proportional-action coefficient Kp and the reset time
Tn. Due to the proportional component, the manipulated variable immediately reacts to any
error signal e, while the integral component starts gaining influence only after some time. Tn
represents the time that elapses until the I component generates the same control amplitude
that is generated by the P component (Kp) from the start. As with I controllers, the reset time
Tn must be reduced if the integral-action component is to be amplified.
479
TIA Portal Module 012
Controller dimensioning:
By adjusting the Kp and Tn values, oscillation of the controlled variable can be reduced,
however, at the expense of control dynamics.
PI controller applications: Fast control loops allowing no steady-state error
Examples: pressure, temperature. ratio control, etc.
PID I
emax
Block diagram
t1
t2
ymax
t1 t2
with
480
TIA Portal Module 012
- Adjust the controlled system manually to the desired operating point (start up control loop).
- Set the manipulated variable of the controller to the manually adjusted value and switch to
automatic operating mode.
- Continue to increase Kp (decrease Xp) until the controlled variable encounters harmonic
oscillation. If possible, small step changes in the setpoint should be made during the Kp
adjustment to cause the control loop to oscillate.
- Multiply the values of Kp,crit and Tcrit by the values according to the table and enter the
determined values for Kp, Tn and Tv at the controller.
Kp Tn Tv
481
TIA Portal Module 012
x/%
K*KS
Turning point
Tu Tg t/sec
Figure: Tu-Tg-Approximation
Tg
KPR = 0.9
KSTu
TN = 3.33 Tu
Use of these tuning values generally results in very good response to disturbances.
482
TIA Portal Module 012
4.8.2 Tuning the PI controller according to the Chien, Hrones and Reswick
method
Both the response to disturbances and response to setpoint changes were examined in order
to achieve the most favorable controller parameters. Different values are yielded for the two
cases. In addition, two different adjustments are specified in each case that meets different
control performance requirements.
This resulted in the following adjustments:
· For response to disturbances:
Aperiodic transient reaction 20 % overshoot minimum
with the shortest duration oscillation period
Tg Tg
KPR = 0.6 KPR = 0.7
KSTu KSTu
T N = 4 Tu TN = 2.3 Tu
Tg Tg
KPR = 0.35 KPR = 0.6
KSTu KSTu
TN = 1.2 Tg TN = Tg
Comparing Analog
controller System
element
483
TIA Portal Module 012
Often, however, it is advantageous to perform the actual evaluation of the system error
digitally. For one thing, the relationship between the system error and controller output
variable can be defined much more flexibly when it can be defined by an algorithm or formula
that can be used in each case to program a computer than when it has to be implemented in
the form of an analog circuit. For another, digital technology enables significantly greater
integration of circuits so that multiple controllers can be accommodated in the smallest space.
Finally, by dividing the computing time when there is a sufficient amount of computing
capacity, it is even possible to use an individual computer as a controller for multiple control
loops.
To enable digital processing of the variables, both the reference variable and the feedback
variable are first converted to digital values in an analog-to-digital converter (ADC). These are
then subtracted from one another by a digital comparing element and the difference is passed
to the digital controlling element. Its controller output variable is then converted back to an
analog value in a digital-to-analog converter (DAC). From the outside, the combined unit of
converters, comparing element and controlling element resembles an analog controller.
We will examine the structure of a digital controller based on a diagram:
Comparing Digital
ADC element controller DAC System
ADC
The advantages resulting from digital implementation of the controller are accompanied by
various problems. For this reason, the size of some variables related to the digital controller
must be chosen large enough to prevent the accuracy of the closed loop control from suffering
too much from digitization.
The performance of the digital controller must be high enough that its response is apparently
as prompt and precise as an analog controller.
484
TIA Portal Module 012
5 Task
In this chapter, a PID controller for speed control will be added to the program from chapter
Analog. The call-up of the "MOTOR_SPEEDCONTROL" [FC10] function must be deleted for
this.
6 Planning
The PID_Compact technology object is available in the TIA Portal for closed loop controls.
For closed-loop control of the motor speed, this technology object replaces the
"MOTOR_SPEEDCONTROL" [FC10] block.
This will be carried out as an expansion of the "032-500_Analog_Values_" project. This project
must be retrieved from the archive beforehand.
The call-up of the "MOTOR_SPEEDCONTROL" [FC10] function must be deleted in the "Main"
[OB1] organization block before the technology object can be called and connected in a cyclic
interrupt OB.
The PID_Compact technology object must then be configured and commissioned.
485
TIA Portal Module 012
486
TIA Portal Module 012
I Input Q Output
NC Normally Closed
NO Normally Open
487
TIA Portal Module 012
® The next step is to select the target directory where the retrieved project will be stored.
Confirm your selection with "OK".
(® Target directory ® OK)
488
TIA Portal Module 012
® We need a cyclic interrupt OB for calling the PID_Compact controller. Therefore, select
the 'Add new block' item in the Program blocks folder.
(® Program blocks ® Add new block)
® Select in the next dialog and rename the cyclic interrupt OB to: "Cyclic interrupt
50ms". Set the language to FBD and assign "50000 µs" as the cyclic time. Select the
"Add new and open" check box. Click "OK".
489
TIA Portal Module 012
(® ® Name: Cyclic interrupt 50ms ® Language: FBD ® Cyclic time (ms): 50000 ®
Add new and open ® OK)
® The block is then directly opened. Enter meaningful comments and move the
'PID_Compact' technology object to Network 1 using drag-and-drop.
(® Technology ® PID Control ® Compact PID ® PID_Compact)
® Assign a name for the instance data block and apply it with OK.
(® PID_Compact_Motor_Speed ® OK)
490
TIA Portal Module 012
® Expand the view of the block by clicking the ' ' arrow. Interconnect this block as shown
here with setpoint (constant: 15.0), actual value (global tag "-B8"), manipulated variable
(global tag "-U1") and Reset input for deactivating the controller (global tag "-Q3"). Negate
the 'Reset' input. The configuration mask ' ’ of the controller can then be opened.
491
TIA Portal Module 012
® There are 2 views for configuration of the controller: Parameter view and Functional view.
Here we will use the easier-to-understand 'Functional view'.
(® Functional view)
® In the 'Basic settings', the 'Controller type' and the interconnection of the 'Input / output
parameters' are entered. Set the values as shown here.
(® Basic settings® Controller type ® Input / output parameters)
® In 'Process value settings' we scale to the range +/- 50 rpm and define the 'Process value
limits' of +/- 45 rpm.
(® Process value settings ® Process value limits ® Process value scaling)
492
TIA Portal Module 012
® In the 'Advanced settings', a process value monitoring would be possible but we don't
want to deal with that here.
(® Advanced settings ® Process value monitoring)
® In the 'Advanced settings' for 'PWM' (pulse width modulation), we will leave the default
values since the output for this is not needed in our project.
(® Advanced settings ® PWM)
493
TIA Portal Module 012
® In the 'Advanced settings', we define the 'Output value limits' of 0.0 % to 100.0 %.
(® Advanced settings ® Output value limits)
® In the 'Advanced settings', you will now also find a manual setting of the 'PID parameters'.
Once we have changed the controller structure to 'PI', the configuration window is closed
by clicking and we receive a finished product with a functional PID controller. This
should, however, still be commissioned and tuned online during operation.
® To save your project, click the button in the menu. To compile all blocks,
click the "Program blocks" folder and select the icon for compiling in the menu.
(® ® Program blocks ® )
494
TIA Portal Module 012
(® )
495
TIA Portal Module 012
® Click the Monitoring on/off icon to monitor the state of the blocks and tags when
testing the program. At the first start of the CPU, however, the 'PID_Compact' controller is
not yet tuned. We still have to start the tuning by clicking the ' ' icon.
496
TIA Portal Module 012
(® )
497
TIA Portal Module 012
® The pretuning starts. The current work steps and any errors that occur are shown in the
"Tuning status" field. The progress bar shows the progress of the current work step.
498
TIA Portal Module 012
499
TIA Portal Module 012
® 'Fine tuning' is selected as the 'Tuning mode' and this is then started.
(® Tuning mode ® Fine tuning ® )
® The fine tuning starts. The current work steps and any errors that occur are shown in the
"Tuning status" field. If the self-tuning was completed without error message, the PID
parameters have been tuned. The PID controller switches to automatic mode and uses
the tuned parameters. The tuned PID parameters are retained at a Power ON and restart
of the CPU. You can download the PID parameters from the CPU to your project with the
(® )
® The PID parameters in the configuration can be displayed by clicking ' '.
(® )
500
TIA Portal Module 012
® As the final step, the online connection should be disconnected and the complete project
should be saved.
(® ® )
501
TIA Portal Module 012
8 Checklist
No. Description Completed
502
Training Curriculum
Siemens Automation Cooperates with Education | 05/2017
Unrestricted 503
TIA Portal Module 013
Table of contents
1 Objective ........................................................................................................................................... 506
2 Requirement ..................................................................................................................................... 506
3 Required hardware and software ..................................................................................................... 506
4 Theory............................................................................................................................................... 508
4.1 SINAMICS G120 frequency converter...................................................................................... 508
4.2 Components for configuring SINAMICS G120 ......................................................................... 508
4.2.1 Control Units CU250S-2 ...............................................................................................................508
4.2.2 Operator Panels ............................................................................................................................509
4.2.3 Memory cards for Control Unit (optional) ....................................................................................510
4.2.4 Brake Relay ...................................................................................................................................510
4.2.5 Safe Brake Relay ..........................................................................................................................510
4.2.6 PM240-2 Power Modules .............................................................................................................510
4.2.7 PM250 Power Modules ................................................................................................................511
4.2.8 Line filter.........................................................................................................................................511
4.2.9 Line reactor....................................................................................................................................511
4.2.10 Output reactor................................................................................................................................512
4.2.11 Sine-wave filter ..............................................................................................................................512
4.2.12 Braking resistor..............................................................................................................................512
4.3 Parameter assignment of the SINAMICS G120 ....................................................................... 513
4.3.1 Display parameters .......................................................................................................................513
4.3.2 Adjustable parameters..................................................................................................................513
4.3.3 P0010 Drive commissioning parameter filter ..............................................................................513
4.3.4 P0015 Macro drive unit.................................................................................................................514
4.3.5 Changeability depending on the converter state ........................................................................514
4.3.6 BICO technology ...........................................................................................................................515
4.3.7 Control Data Set (CDS) and Drive Data Set (DDS) ...................................................................516
4.4 Commissioning of the SINAMICS G120 frequency converter.................................................. 516
4.4.1 Restoring factory settings through a parameter reset ................................................................517
4.4.2 Basic commissioning ....................................................................................................................517
4.5 PROFINET interface of the SINAMICS G120, CU250S-2 PN Vector ...................................... 517
4.5.1 Telegrams......................................................................................................................................518
4.5.2 Assignment of the process data (PZD) for the SINAMICS G120 with Standard Telegram 1 .518
4.5.3 Control word 1 (STW1).................................................................................................................518
4.5.4 Status word 1 (ZSW1) ..................................................................................................................519
4.5.5 Main setpoint (HSW/NSOLL_A; 16-bit) .......................................................................................520
4.5.6 The main actual value (HIW/NIST_A; 16-bit)..............................................................................520
4.5.7 Layout of the request telegram in double-word format...............................................................521
504
TIA Portal Module 013
505
TIA Portal Module 013
2 Requirement
This chapter is based on chapter "Global data blocks for SIMATIC S7 CPU1516F-3 PN/DP".
In order to carry out this chapter you can for example, use the following project: Data Block.
506
TIA Portal Module 013
2 SIMATIC STEP 7
Professional (TIA Portal)
as of V13
1 Engineering station
3 SINAMICS Startdrive
(TIA Portal) as of V13
6 Ethernet connection
6 Ethernet connection
507
TIA Portal Module 013
4 Theory
4.1 SINAMICS G120 frequency converter
Each SINAMICS G120 converter consists of a Control Unit (CU) and a Power Module (PM).
• The Control Unit controls and monitors the Power Module and the connected motor.
• The Power Modules contain rectifiers and converters for motors in a
power range of 0.37 kW to 250 kW.
Note: More detailed information about the frequency converter G120 with Control Unit
CU250S-2 PN Vector is available in the manuals. In this module the frequency converter
SINAMICS G120 is used as a PROFINET IO device.
The Control Units CU250S-2 differ with regard to their type of fieldbus connections. There are
Control Units CU250S-2 with:
● RS485 interface for USS, Modbus RTU
● PROFIBUS interface
● RS485 interface for PROFINET, Ethernet/IP
● CANopen interface
All the Control Units have an EEPROM in order for power-failure-proof storage of the
configuration data.
The used Control Unit CU250S-2 Vector has a PROFINET interface with two ports that
supports the PROFIdrive, PROFIsafe and PROFIenergy profiles.
In addition, for example, HTL or TTL encoders and temperature sensors can be connected
directly to a 15-pin encoder interface and DRIVE-CLiQ-compatible encoders as well as
sensor modules to a DRIVE-CLiQ interface of the Control Unit.
The Control Unit supports the following functions of Safety Integrated (SIL 3, PL e, Cat. 3):
508
TIA Portal Module 013
The Intelligent Operator Panel (IOP) is available for snapping onto the Control Unit or as a
hand-held unit with a connecting line to the Control Unit. The IOP enables operator control and
diagnostics of the converter.
The BOP-2 is an Operator Panel for snapping onto the Control Unit. The BOP-2 has a two-line
display for diagnostics and operator control of the converter.
Note: For further information on the Operator Panels, please refer to the manuals:
509
TIA Portal Module 013
The Brake Relay provides a switch contact (NO contact) to control the motor brake solenoid.
The Safe Brake Relay controls a 24-V motor brake and monitors the brake control for short-
circuits and wire breaks.
The PM240-2 Power Module is available for the following voltage and power range:
● 1-phase/3-phase 200 VAC ... 240 VAC 0.55 kW ... 4.0 kW
● 3-phase 200 VAC ... 240 VAC 5.5 kW ... 7.5 kW
510
TIA Portal Module 013
Note: If frequency converters are not put into operation for a longer period, the DC link
capacitors have to be formed in accordance with the specifications in the operating
instructions.
The PM250 Power Module is available for the following voltage and power range:
● 3-phase 380 VAC - 480 VAC ±10% 7.5 kW to 90 kW
Note: If frequency converters are not put into operation for a longer period, the DC link
capacitors have to be formed in accordance with the specifications in the operating
instructions.
A line filter allows the converter to reach a higher radio interference category. An external filter
is not required for converters with built-in line filter.
The line reactor supports overvoltage protection, flattens the harmonics in the power network
and bridges commutation notches.
511
TIA Portal Module 013
Output reactors reduce the voltage load of the motor windings as well as the load of the
converter through capacitive charge/discharge currents in the lines. An output reactor is
required for shielded motor lines greater than 50 m or unshielded motor lines greater than 100
m.
The sine-wave filter at the output of the converter limits the voltage gradient and the peak
voltages at the motor motor winding. The maximum permissible motor supply line length
increases to 300 m. An output reactor becomes superfluous.
The braking resistor allows rapid braking of loads with a high moment of inertia.
The Power Module controls the braking resistor through its integrated brake chopper.
512
TIA Portal Module 013
513
TIA Portal Module 013
DI 3 = 0
Telegram 1, PZD2
Speed setpoint
Jogging 1 or 2 DI 3 = 1
Speed setpoint
18 DO 0 Fault
19
20
21 DO 1 Warning
22
12 AO 0 Actual speed value
26 AO 1 Actual current value
Note: Information about further macros is available in the operating instructions of the
respective Control Unit.
Status Description
C(*) Quick commissioning (P0010 = *)
U Operation (drive running)
T Drive ready-to-start
514
TIA Portal Module 013
Binectors
A binector is a digital (binary) signal without any units that can have either the value 0 or 1.
Binectors always reference functions. They are divided into binector inputs (BI) and binector
outputs (BO).
The binector input is always identified with a "P"-parameter (for example, P0840 BI:
ON/OFF1), whereas the binector output is always represented with an "r"-parameter (for
example, r1025 BO: FF status).
Example
Combination of the command ON/OFF1 with selection of a fixed frequency.
BI: ON/OFF1
BO: FF status P0840
Function Function
r1025 (1025.0)
P0840 = 1025.0
Binector output (BO) à Binector input (BI)
When a fixed frequency is selected, the fixed frequency status bit (r1025) is changed internally
from 0 to 1.
The source for the command ON/OFF1 is the parameter P0840 (default DI0). When the fixed
frequency status bit is connected as the source for P0840 (P0840 = 1025), the converter starts
by activating a fixed frequency and stops with OFF1 for deactivation of the fixed frequency.
515
TIA Portal Module 013
Connectors
A connector (16 or 32 bits) has a value that can contain a normalized variable (dimensionless)
or also a variable with assigned units.
Connectors always reference functions. They are divided into connector inputs (CI) and
connector outputs (CO). In essence the same applies as for binectors: The connector inputs
are identified by a "P"-parameter (for example P0771 CI: AO (analog output)), whereas the
connector outputs are always represented with an "r"-parameter (for example r0021 CO:
Actual frequency).
Example
Interconnection of the parameter r0755 (display analog input) with an internal value (main
frequency setpoint). To this purpose the CO parameter r0755 (scaled analog input) has to be
interconnected with the CI parameter P1070 (main setpoint).
CI: Main setpoint
CO: Actual AI after scaling [4000 h] P1070
Function Function
r0755 (755[0])
P1070 = (755[0])
(Connector output (CO) à Connector input (CI)
4.3.7 Control Data Set (CDS) and Drive Data Set (DDS)
Drive engineering has applications in which simutaneous changeover of multiple parameters
with external signals is needed during operation.
To enable this, certain parameters have been organized into groups. These so-called data
sets are:
● Control Data Set (CDS)
● Drive Data Set (DDS)
Note: For more details, refer to the list manual and the operating instructions.
516
TIA Portal Module 013
The frequency converter can be integrated into an Ethernet network at the PROFINET
interface X150 with the two ports P1 and P2. Now:
● The parameter assignment and diagnostics of the frequency converter via Ethernet can be
carried out by using the SINAMICS Startdrive software in the TIA Portal.
● The converter can be integrated into a PROFINET network.
517
TIA Portal Module 013
4.5.1 Telegrams
Various telegrams, whose process data lengths and contents differ, are available for selection
for IO-RT communication with the frequency converter.
The simplest telegram, set as the standard, is the Standard Telegram 1.
4.5.2 Assignment of the process data (PZD) for the SINAMICS G120 with
Standard Telegram 1
Control words and setpoints (PLC -> SINAMICS) and status words and actual values
(SINAMICS -> PLC) can be transferred with the process data. The structure of the PZD area
is as follows for Telegram 1, for a coupling via PROFINET:
PZD1 PZD2
Request telegram Control word Main setpoint
(PLC -> SINAMICS) (STW1) (NSOLL_A)
Response telegram Status word Main actual value
(SINAMICS -> PLC) (ZSW1) (NIST_A)
518
TIA Portal Module 013
lockout“ state.
8, 9 Reserved
10 0 = No control via PLC Inverter ignores the process data from the P0854[0]=
fieldbus. r2090.10
1 = Control via PLC Control via fieldbus, inverter accepts the
process data from the fieldbus.
11 1 = Direction reversal Invert setpoint in the inverter. p1113[0] =
r2090.11
12 Not used
13 ---1) 1 = MOP up Increase the setpoint saved in the motorized P1035[0] =
potentiometer. r2090.13
14 ---1) 1 = MOP Reduce the setpoint saved in the motorized P1036[0]=
down potentiometer. r2090.14
15 CDS bit 0 Reserved Changes over between settings for different P0810 =
operation interfaces (command data sets). r2090.15
1) If you change over from another telegram to telegram 20, then the assignment
of the previous telegram is kept.
519
TIA Portal Module 013
2) If you change over from another telegram to telegram 20, then the assignment
of the previous telegram is kept.
The main setpoint is a 16-bit word in which the required speed is transferred to the converter.
The setpoint is transferred as an integer with preceding sign (-32768 to 32767). The value
16384 (4000 Hex) corresponds to +100%.
The value 100% is defined at a particular rotary speed by means of the parameter P2000
(reference speed). The speed that is to correspond to a setpoint of 100% via the interface is
entered in this parameter.
The speed of the converter is calculated as follows:
n= (HSW x P2000)/16384
Note: The parameter P2000 (reference speed) is automatically calculated for Drive Data Set 0
during motor startup and set to the value of parameter P1082 (maximum speed).
The main actual value is a 16-bit word through which the actual speed of the converter is
transferred. The normalization of this value corresponds to that of the setpoint.
n= (HIW x P2000)/16384
Note: The parameter P2000 (reference speed) is automatically calculated for Drive Data Set 0
during motor startup and set to the value of parameter P1082 (maximum speed).
520
TIA Portal Module 013
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
Note: A data block in which the data are stored temporarily is used for the request telegram
and for the response telegram in the control program. The telegrams are mapped there
respectively in a structure that is created by means of the PLC data types.
521
TIA Portal Module 013
SINAMICS Startdrive is a tool integrated in TIA Portal and corresponds to the familiar
TIA Portal in its structure and handling.
The SINAMICS Startdrive extension contains the data and views for the SINAMICS G120
frequency converters already supported there.
This enables easy parameter assignment and commissioning of the frequency converters. A
wide range of functions and aids are available for diagnostics and troubleshooting.
® Then select the item ® "Online & Diagnostics" and open the ® "Project view".
® In the project tree select the network card of your computer under ® "Online access".
When you click ® "Update accessible devices", you see the IP address (if already set) or
the MAC address (if the IP address has not yet been assigned) of the Control Unit of the
connected SINAMICS G120 frequency converter®. Select ® "Online & diagnostics".
522
TIA Portal Module 013
® Before you reassign the IP address, we recommend that you first reset the PROFINET
interface parameters. To do so select the function ® "Resetting the PROFINET interface
parameters" and click ® "Reset".
® Answer the prompt whether you really want to reset with ® "Yes".
523
TIA Portal Module 013
® Then once again select ® "Update accessible devices" and then ® "Online &
diagnostics" of your frequency converter. To assign the IP address, select the function ®
"Assign IP address". Enter the following IP address at this point: ® IP address:
192.168.0.6 ® Subnet mask: 255.255.255.0. Click ® "Assign IP address" and this new
address is assigned to the Control Unit of your frequency converter.
® The successful assignment of the IP address is shown again as a message in the window
® "Info" ® "General".
® Before you can now carry out resetting of the frequency converter to the factory setting
you have to once again select ® "Update accessible devices" and the ® "Online &
Diagnostics" of your frequency converter. In order to reset the frequency converter to
factory settings, select ® "Restore factory resetting" under ® "Backing up/reset" and
click ® "Start".
524
TIA Portal Module 013
® Select the option "Save factory setting in EEPROM" so that the parameters of the
factory setting are loaded from the EEPROM into the RAM of the device after switching
off and on - and not the data of an old project. Confirm the prompt whether you really
want to reset with ® "OK".
Note: The communication settings such as the IP address and the subnet mask are
retained when the frequency converter is set to the factory setting.
5 Task
In the following section the project from the chapter "SCE_EN_032-600_Global_Data_Blocks"
is to be supplemented by a frequency converter G120 with Control Unit CU250S-2 PN.
Controlling of the belt motor via analog values is now replaced by the controlling of the
frequency converter via PROFINET. Monitoring of the actual speed value is also effected via
PROFINET.
525
TIA Portal Module 013
6 Planning
The conveyor belt driven by an induction motor will now be controlled via a frequency
converter with a variable speed.
This frequency converter has to created, configured and commissioned in the project.
The parameter assignment of the frequency converter is done offline with the SINAMICS
Startdrive software, whereby the commissioning wizard is used.
Here the motor data of the induction motor are taken from the rating plate of the motor and
entered manually.
In this project the following induction motor is wired in Delta mode and operated single-phase
with 230V.
A diagram of the two connection types can be found on the inside of the terminal box cover of
most motors:
• Star connection (Y)
• Delta connection (Δ)
The frequency converter SINAMICS G120 receives the start command and speed
specification in the following via PROFINET from the SIMATIC S7-1500. The actual speed
value is also read out of the SINAMICS G120 frequency converter via PROFINET and is
monitored for the high and low limits in the SIMATIC S7-1500.
A "Frequency converter" data block [DB4] is created in the control program in which the data
are stored temporarily for the request telegram and the response telegram. The telegrams are
created there by means of the PLC data types and are mapped respectively in a structure.
In the "Main" organization block [OB1] you copy the actual values from the converter into the
"Frequency converter" data block [DB4] and the setpoints from the data into the converter.
Finally the data created in the "Frequency converter" data block [DB4] can be accessed when
calling up the functions and function blocks.
526
TIA Portal Module 013
527
TIA Portal Module 013
DO Type ID Function
I Input O Output
NC Normally Closed
NO Normally Open
528
TIA Portal Module 013
® Next, the target directory in which the retrieved project is to be stored can be selected.
Confirm your selection with "OK".
( ® Target directory ® OK )
® Save the opened project under the name 062-101 Frequency converter G120 and S7-
1500.
( ® Project ® Save as … ® 062-101 Frequency converter G120 and S7-1500 ® Save )
529
TIA Portal Module 013
® Connect the Ethernet interfaces of the Control Unit of the G120 and the CPU1516F-3 PN
® Set an IP address suitable for the CPU in the properties of the 'PROFINET interface [X1]'
of the 'G120'.
( ® G120 CU250S-2 PN Vector ® PROFINET interface [X1] ® Properties ® Ethernet
addresses ® IP protocol ® IP address: 192.168.0.6 )
530
TIA Portal Module 013
Note: This name is applied automatically as the PROFINET device name under the
'PROFINET' point for the 'PROFINET interface' of the 'G120 CU250S-2 PN-Vector'.
Settings for the 'IO cycle' such as the 'Update time' and 'Watchdog time' can also be set
for this device.
(® Advanced options ® Real time settings ® IO cycle ® Update time ® Watchdog time)
® The 'Standard Telegram 1' is specified for the 'Cyclic data exchange' between the PLC
and the frequency converter.
( ® PROFINET interface [X1] ® Cyclic data exchange ® Actual value: Standard
Telegram 1® Setpoint: Standard Telegram 1 )
531
TIA Portal Module 013
® For the address ranges, select 'I 256…259' and 'O 256 … 259'.
( ® PROFINET interface [X1] ® Cyclic data exchange ® Actual value ® Start address
I 256 ® Setpoint ® Start address O 256 )
532
TIA Portal Module 013
® Change to the 'Device view' from 'Drive_G120_conveyor'. There the used Power Module,
for example 'PM240-2 IP20 FSA U 1/3 AC200 0.75kW', is selected and assigned to the
'Drive_G120_conveyor'.
( ® Device view ® Drive_G120_conveyor ® PM 240-2 IP20 FSA U 1/3 AC200 0.75kW )
(® )
533
TIA Portal Module 013
® Download the device configuration with the frequency converter G120 as the device to
the 'CPU_1516F [CPU1516F-3 PN/DP]' by clicking the ' Download to device' icon.
® The device name still has to be assigned to the frequency converter G120 as an IO
device of the CPU_1516F. To do so, select the 'PN/IE_1' network and select 'Assign
device name'.
( ® PN/IE_1 ® Assign device name )
534
TIA Portal Module 013
® In the subsequent dialog, the ''PG/PC interface' can be selected, before we select the
'Drive_G120_conveyor' and 'Assign name'.
( ® PROFINET device name: Drive_G120_conveyor ® SINAMICS G120 CU250S ®
Assign device name )
535
TIA Portal Module 013
Note: If several IO devices exist in the network, the device can be identified on the basis of
the imprinted MAC address.
® If too many components are displayed, the view can be filtered by clicking on 'Only show
devices of the same type'. If the device name was assigned successfully, this is indicated
by 'OK' in the status. ( ® Close )
536
TIA Portal Module 013
® In the subsequent dialog, select 'U/f control with linear characteristic' as the control type.
Keep the default selection for the function modules.
( ® U/f control with linear characteristic ® Next )
® For selection of the setpoint and command source, select the macro 7 'Fieldbus with data
set changeover'. ( ®[7] Fieldbus with data set changeover )
537
TIA Portal Module 013
® The selection of the macro '[7] Fieldbus with data set changeover' still has to be
confirmed with 'Accept'.
( ® Accept )
® The current interconnections of the IO terminals for the Macro 7 are now displayed.
( ® Next )
538
TIA Portal Module 013
® For the drive settings, select the 'IEC-Motor (50 Hz, SI units)' and 'Load duty cycle with
high overload for vector drives'.
( ® IEC-Motor (50 Hz, SI units) ® Load duty cycle with high overload for vector drives ®
Next )
Note: Further information about the settings is available in the tool tip text, the online help or in
the list manual.
539
TIA Portal Module 013
® In the subsequent dialog, select 'Induction motor' as the motor type and enter the motor
data in accordance with the specifications of the rating plate of the motor
( ® Enter motor data ® Induction motor ® Connection type: Delta ® … ® Next )
Note: Alternatively SIEMENS motors can also be selected directly via the order numbers.
® The following screenshot shows an example for the parameters for the current/speed
limiting and for the ramp-function generator.
( ® Next )
540
TIA Portal Module 013
® Select 'Standard drive' for the Technology application. Set the motor identification to
'Inhibited', and select 'Complete calculation' for calculating the motor parameters based
on parameter values from before.
( ® Standard drive ® Motor identification: Inhibited ® Complete calculation ® Next )
® In the subsequent summary, all the settings are shown once more for checking. These
are applied by using the 'Finish' button.
( ® Finish )
541
TIA Portal Module 013
® Save the project once more before downloading the parameters into the
'Drive_G120_conveyor’‚ ‘. (® ® Drive_G120_conveyor ® )
® In the subsequent dialog, select 'PN/IE' as the PG/PC interface type, select the previously
set network adapters as the PG/PC interface and select 'PN/IE_1' as the connection of
the CPU to the subnet. Click 'Start search'.
( ® Type of the PG/PC interface: PN/IE ® PG/PC interface: …… ® Connection to
interface/subnet: PN/IE_1 ® Start search )
542
TIA Portal Module 013
® You should now see your 'SINAMICS drive' and be able to select it as the target device.
Click 'Load''. ( ® SINAMICS drive ® Load )
543
TIA Portal Module 013
Note: It is advisable to back up the parameters in the EEPROM as well, so that these are
retained in the case of a voltage drop
'.
® The first step is to 'Activate master control' in the control panel. The communication
between the PC and the converter will then be monitored It is necessary that successful
communication takes place at least every 10000 ms. Otherwise the motor stops and the
enables are reset.
544
TIA Portal Module 013
® The drive enables first have to be set in order to start the motor . As a rule
this happens automatically. The drive can then be switched on .
( ® Switch on )
( ® Speed: 44 ® )
545
TIA Portal Module 013
® The drive can be switched off by clicking ' '. After completion of the test, it is necessary
(® ® )
(® )
® Finally, ' ' and save the project again ' '.
(® ® )
546
TIA Portal Module 013
® Change the name of the PLC data type to 'FU_Receive_Telegram1' and open it by
double-clicking it.
( ® FU_Receive_Telegram1 )
547
TIA Portal Module 013
® Create the tags shown below the same as in a data block. ( ® FU_Receive_Telegram1 )
® Create an additional PLC data type called 'FU_Send_Telegram1' and the tags shown
below.
( ® FU_Send_Telegram1 )
548
TIA Portal Module 013
Note: For some enable bits, the start value is already set to TRUE so that these do not have
to be set additionally in the program.
® Create the global data block 'FREQUENCY_CONVERTER' for the request and response
telegram.
( ®Add new block ® DB ® Global DB ® FREQUENCY_CONVERTER ® OK )
® Create the tag 'Send_G120_01' and select 'FU_SEND_Telegram1' as the data type.
( ® Send_G120_01 ® "FU_SEND_Telegram1" )
549
TIA Portal Module 013
® The data block can be created quickly and efficiently by using the PLC data types
'FU_SEND_Telegram1' and 'FU_RECEIVE_Telegram1', see representation.
550
TIA Portal Module 013
® The global PLC tags are created in a new tag table for the communication with the
frequency converter.
( ® Add new tag table )
® Change the name of the tag table to 'Tag_table_G120‘ and specify, as shown, two
structure tags 'PZD_IN_G120_01' and 'PZD_OUT_G120_01' using the PLC data types
'FU_RECEIVE_Telegram1' and 'FU_SEND_Telegram1'.
( ® PZD_IN_G120_01 ® 'FU_RECEIVE_Telegram1' ® PZD_OUT_G120_01®
'FU_SEND_Telegram1' )
551
TIA Portal Module 013
® The tags have been created in accordance with their structures by the use of the PLC
data types 'FU_SEND_Telegram1' and 'FU_RECEIVE_Telegram1'. Open the 'Main' block
[OB1].
( ® Main [OB1] )
® Insert two new networks at the beginning of the Main [OB1]. Drag-&-drop the 'Move'
command from the ''Instructions' under the 'Move operations' item into these networks.
552
TIA Portal Module 013
® Select the 'Tag_table_G120' in the project navigation. Now you can drag-&-drop the two
tags 'PZD_IN_G120_01' and 'PZD_OUT_G120_01' directly from the details view onto the
connections of the Move instructions.
( ® Tag_table_G120 ® PZD_IN_G120_01 ® PZD_OUT_G120_01 )
® Select the "FREQUENCY_CONVERTER [DB4]' data block in the project tree. You can
again drag-&-drop the two structure tags 'Send_G120_01' and 'Receive_G120_01'
directly from the details view onto the connections of the Move instructions.
( ® Send_IN_G120_01 ® Receive_OUT_G120_01 )
553
TIA Portal Module 013
® Open the structure of the tag 'Receive_G120_01' in the details view and from there drag-
&-drop the tag 'Receive_G120_01.XIST_A' to the connection 'Actual_speed_AI' of the
block 'MOTOR_SPEED_MONITORING'. ( ® Receive_G120_01.XIST_A )
554
TIA Portal Module 013
(® ® Program blocks ® )
555
TIA Portal Module 013
( ® Main [OB1] ® )
® The complete send and receive data of the communication with the converter ( control
words/status words/setpoint/actual value) are visible in the 'FREQUENCY_CONVERTER
[DB4]' data block. Monitoring can be activated and deactivated at this point as well by
( ® FREQUENCY_CONVERTER [DB4] ® )
556
TIA Portal Module 013
® The online network view lends itself to diagnostics of the PROFINET connection between
the CPU 1516F controller and the frequency converter.
® )
557
TIA Portal Module 013
® Under 'Drive enable signals' you also see the missing enables in order to be able to start
the motor.
( ® Drive enable signals )
® Under 'Active messages' you see pending faults and warnings. You can click the ' '
icon to acknowledge these.
( ® Active messages ® )
558
TIA Portal Module 013
® The values can also be monitored online in the 'Functional View' of 'Parameter'.
( ® Parameter ® Functional View )
559
TIA Portal Module 013
7.9 Checklist
560