Tia Pro1 12 Connecting Hmi
Tia Pro1 12 Connecting Hmi
Tia Pro1 12 Connecting Hmi
Contents 12
AR
12. Connecting an HMI Device .................................................................................. 12-2
12.1. Task Description: Operating the Plant via the Touchpanel ................................................ 12-3
12.2. Data Exchange between HMI Devices and CPU ................................................................ 12-4
12.3. WinCC Configuration Interface ........................................................................................... 12-5
12.4. Adding an HMI Device ........................................................................................................ 12-6
12.4.1. Configuring the IP Address of an HMI Device .................................................................... 12-7
12.4.2. Networking an HMI Device ................................................................................................. 12-8
12.4.3. Configuring an HMI Connection .......................................................................................... 12-9
12.4.4. Creating HMI Tags and Connecting them with PLC Tags ................................................ 12-11
12.5.
12.5.1.
12.6.
12.7.
12.7.1.
N
I/O Field for Inputting and Outputting Values .................................................................... 12-12
Buttons for Function Execution ......................................................................................... 12-13
Compiling the Configuration.............................................................................................. 12-14
Downloading the Project into the HMI Device .................................................................. 12-15
Requirements for Downloading......................................................................................... 12-16
AI
12.7.2. Exercise 1: Copying the Touchpanel and the Expanded Interface DB into the Project ... 12-17
12.7.3. Exercise 2: Networking the Touchpanel ........................................................................... 12-18
12.7.4. Exercise 3: Configuring the HMI Connection .................................................................... 12-19
12.7.5. Exercise 4: Updating and Completing the HMI Tag Table ............................................... 12-20
12.7.6. Exercise 5: Configuring the SETPOINT Quantity Display ................................................ 12-21
12.7.7. Exercise 6: Compiling and Saving the Touchpanel .......................................................... 12-22
12.7.8. Exercise 7: Adjusting the STEP 7 Program ...................................................................... 12-23
TR
12.7.9. Exercise 8: Downloading the HMI Project and CPU Project ............................................ 12-24
12.8. Additional Information ....................................................................................................... 12-25
12.8.1. HMI Access to Tags / Variables ........................................................................................ 12-26
12.8.2. Manually Setting the Transfer Mode, Transfer Channel and Address.............................. 12-27
SI
AR
... be able to explain the principle of data exchange between HMI device
and CPU using tags
N
AI
TR
SI
Operation Off
"S_operationOFF" (NC)
Operation On
Operation
"S_operationON
"P_operation"
"
Jog Right
"S_right"
Jog Left
AR
"S_left"
Conveyor-
Acknowledge fault
Fault
"S_acknowledge"
"P_fault"
Task Description
N
The touchpanel project is to be commissioned and the S7 program of the controller is to be
adjusted in such a way that…
AI
• the functions "Operation ON/OFF" and "Jog Right/Left" are no longer realized via the
simulator switches but via the corresponding buttons on the touchpanel.
• the acknowledgement of a conveyor fault should still be possible via the simulator switch
"S_acknowledge", and, in addition, also via the corresponding button on the touchpanel.
• the SETPOINT quantity is no longer a constant three, but can be preset via an input field on
TR
the touchpanel.
SI
Press Button
"Set Bit"
Release Button
AR
"Reset Bit"
PROFIBUS
Industrial Update
Ethernet e.g. every 500ms
HMI Tags
TR
HMI tags can be connected to the global PLC tags or to the following global data areas of the
CPU:
• Data blocks (DB)
• Memory bits (M)
• Inputs (I) and outputs (Q)
• I/O inputs (PI) and I/O outputs (PQ)
HMI systems also recognize local tags without a link to the PLC, i.e. these tags are exclusively
processed internally and also do not reserve any communication resources whatsoever.
SI
Communication
The operator panels can communicate with the (PLC) controller via the PROFIBUS or Industrial
Ethernet bus systems. The S7 protocol is used for this purpose. Communication is organized by
the operating systems of the S7 CPU and the HMI system. There is no user programming effort
required. An operator panel can also exchange data with several (PLC) controllers.
Working area
Toolbox
HMI device such as Buttons,
I/O fields
AR
Details view
Properties
e.g. of a button
Project Window
N
In the Project tree, all devices and their configuration and parameter assignments are displayed
in a tree structure. From there, the relevant editors can be opened. Furthermore, the "language
AI
support" and the "version management" can be found here.
Working Area
This is the central configuration area in which objects of the operator panel are edited with the
started editor. Several editors can be open at the same time.
TR
Properties Window
The properties of selected objects (for example, of screens, screen objects, tags) can be edited in
the Properties window. This window is only available in those editors where object properties
have to be set.
Toolbox Window
The toolbox window contains all configurable objects which can be configured in screens, and
permits access to libraries.
SI
Portal view
A R
N
Project view
A I
New HMI devices can be added from both the Portal view and the Project view. More than
anything else, attention has to be paid to the device data such as Article number (order number)
and Version number.
T R
S I
TIA-PRO1 - Connecting an HMI Device
12-6 Training Document, V16.00.00
SIMATIC TIA Portal Programming 1
AR
Select
interface
AR
Show / Hide
Drag & Drop
address labels
1. Select HMI
connection(s)
AR
2. Use drag & drop to
drag a connection
3. Check
connection
12.4.3.1. Checking the Connection and Entering the Password for CPU Accesses
AR
Password for
HMI accesses
Connection:
N
The configured connections are visible in the Connections of the HMI device.
AI
Password Query for HMI Accesses
In order to get access rights to a CPU that is password-protected, the HMI device must log on to
the CPU with the help of the password when Runtime is started. This password must be specified
in the Connections configuration of the HMI device (see picture bottom right).
TR
SI
12.4.4. Creating HMI Tags and Connecting them with PLC Tags
AR
N
In the HMI tags folder, the HMI tags can be created and they can be connected with the
associated PLC tags via an existing connection. The properties, such as, Access mode,
Acquisition cycle etc., can be defined.
AI
TR
SI
AR
PLC tag
Mode
I/O Fields
N
The values of tags are displayed via output fields; the values of tags can also be preset via input
fields. The mode can be set in the Properties window.
AI
Mode
Output
The value of the tags is only displayed. The tag is read and updated in the interval of the
configured acquisition cycle.
A value change (input) on the operator panel is not possible.
TR
Input/Output
The value of the tags is displayed. The tag is read and updated in the interval of the configured
acquisition cycle.
A value change (input) on the operator panel is possible – on touch displays, using the
automatically displayed Display (screen) keyboard, and, with key devices, using the device
keyboard.
Note:
I/O fields can also be generated by dragging & dropping a tag directly from a tag table or a data
SI
block (also via the Details view). In so doing, an HMI tag is automatically created which is
connected via an existing connection to the PLC tag.
AR
Operating events
of the button
PLC tag
Actions when
operating the The selection of a PLC tag in Properties creates the necessary HMI
button tag, automatically networks the devices and configures a connection!
Buttons
N
System functions can be initiated by the operator via buttons, such as, the selection of a screen
or the setting and resetting of a tag shown in the screen. Under "Events", you specify for which
AI
event which system function is to be executed.
TR
SI
Compile
(Delta generation)
AR
Compile (only changes)
N
Here, all changes since the last generation are regenerated.
AI
→ Delta generation
When correctly configured functions are not correctly executed or are not executed at all.
When error messages occur during compiling that are not "correct".
SI
AR
N
Downloading the Project into the HMI Device
When you transfer an HMI project to one or more operator panels, the part of the project that has
been changed since the last transfer is automatically compiled before downloading. This ensures
AI
that the current project status is always transferred. Beyond that, it is also possible to activate the
option "Overwrite all" before loading starts.
For commissioning, the project should be completely compiled using the command "Compile >
Software (rebuild all blocks)" in the context menu of the operator panel. If HMI tags that are
connected to PLC tags are also used in the project, all modified STEP 7 blocks should also be
compiled using the command "Compile > Software" in the context menu and then be downloaded
TR
Device version
AR
• Target device is ready to load
(transfer mode active)
Transfer Readiness
Two conditions must be fulfilled on the operator panel for the Transfer to panels:
• The connection is actually activated for the Transfer (Settings for the Transfer)
• The operator panel is in the "Transfer mode"
a) Transfer mode "Automatic" and Runtime is started or
SI
Online Settings
Depending on the device connection, the settings in the dialog "Extended download to device"
must also match the current connection and the transfer readiness of the operator panel.
12.7.2. Exercise 1: Copying the Touchpanel and the Expanded Interface DB into
the Project
AR
Task
N
AI
Up until now, your project doesn’t contain an HMI device. Instead of a completely new
configuration, you are to copy an already configured Panel and the data block "InterfaceTP" that
is to serve as the interface between the controller and the touchpanel, from the global library
"PRO1_V160000" into your project.
What to Do
1. Open the global library C:\_Archive\TIA-PRO1_V160000\PRO1_V160000.
TR
2. Using drag & drop, copy the library element "InterfaceTP" from the "Chapter12" folder into
your project (see picture) and, in the dialog that appears, confirm that objects that already
exist in the project are to be overwritten.
SI
3. Using drag & drop, copy the library element "Touchpanel" into your project (see picture).
4. Save your project.
Show address
Drag & Drop labels
AR
Set IP address
Task
N
The added touchpanel is to be networked with the CPU via Ethernet.
AI
What to Do
1. In the Project tree, start the Hardware and Network editor, switch to the "Network view" and
there select "Network".
2. Position the mouse pointer on the small green square (Ethernet interface) of the CPU and,
while keeping the left mouse button pressed down, drag a connection to the small green
square (Ethernet interface) of the HMI device. The network is created; the associated subnet
TR
and the parameters appropriate for the network (IP address and subnet mask) are
automatically created.
3. With the help of the “Show address labels” button, show the IP addresses, check the IP
addresses of the CPU (192.168.111.102) and the touchpanel (192.168.111.101) and, if
necessary, correct these.
This can be set directly at the shown address or also via the Properties of the devices in the
Inspector window.
SI
4. In the Network view, the interfaces of the CPU and the touchpanel should be connected with
the same subnet.
1. Select HMI
connection(s)
AR
3. Check the
connection
Task
N
After the TP has been networked with the Ethernet network, an HMI connection between the
touchpanel and the CPU must be created.
AI
What to Do
1. In the Network view, switch from "Network" to "Connections" and there select "HMI
connection" (see picture).
2. Position the mouse pointer on the small green square of the HMI device and, while keeping
the left mouse button pressed down, drag a connection to the CPU.
TR
The connection is created and given the default name. You can keep the name of the
connection.
3. In the Details window in the "Connections" tab, check whether the HMI connection was
correctly created (see picture).
You must also be able to see the connection in the "Connections" folder of the touchpanel.
If, in the graphic area, only the network(ing) and not the type of connection between the S7-
CPU and the HMI device is displayed, then position the mouse pointer on the network and, in
the dialog window that appears, select the connection or double-click on the connection in the
SI
tabular area.
4. Save your project.
AR
Task
N
The HMI tags "P_operation" and "Interface_actualValue" are not yet connected to PLC tags; in
addition, the connections are highlighted in red. Your task is now to supplement missing tag
AI
connections and to correct faulty connections.
What to Do
1. Open the table "Default tag table" in the HMI tags folder of the touchpanel.
2. If errors are displayed (highlighted in red) in the column ‘Connection’, then correct the
connection in the first line by selecting the existing connection.
TR
3. Adopt the connection of the corrected tag for all other tags by selecting (highlighting) the tag
connection, clicking on the lower right corner of the cell and, while keeping the left mouse
button pressed down, dragging it over all other cells (familiar Excel function). Confirm the
"Autocompletion" dialog that follows with the selection "Overwrite Tag attributes".
4. Connect the HMI tags that are not yet connected to the corresponding PLC tags. Proceed as
shown in the picture.
5. Save your project.
SI
AR
Split editor
Task
N
Up until now, the SETPOINT quantity of the parts to be transported was preset with the value 3
via the tag "InterfaceTP".setpoint. Now, you should be able to preset the SETPOINT quantity via
AI
an input field on the touchpanel instead. For that, an additional input/output field must be
configured in the "11_Conveyor" screen (see picture)
What to Do
1. Close all objects that are open in the Editor.
2. Open the "InterfaceTP" data block in which the setpoint quantity is stored.
TR
3. As well, open the "11_Conveyor" screen in the "Screens > Application > ApplicationName"
folder of the Touchpanel.
4. Split the Editor area in two.
5. Configure the input field for specifying the setpoint quantity by dragging the "setpoint" tag
from the "InterfaceTP" data block into the screen using drag & drop.
6. Select the newly created input/output field and in the Inspector window in "Properties >
General > Format" set the "Format pattern" (three digits). You can adjust how everything
looks in the menus "Appearance" and "Text format".
SI
AR
project
Task
N
You are to compile and save the now complete HMI project.
AI
What to Do
1. Compile the HMI project by selecting the touchpanel in the Project tree and then clicking on
the "Compile" button (see picture).
2. In the Inspector window under "Info", read the results of the compilation and eliminate any
errors which may have occurred.
TR
Operation OFF
"S_operationOFF" (NC)
Operation ON Operation
"S_operationON" "P_operation"
Jog Right
"S_right"
AR
Jog Left
"S_left"
OLD NEW
!!!
Task
N
The S7 program of the controller is to be adjusted in such a way that …
AI
• the functions "Operation ON/OFF" and "Jog Right/Left" are no longer realized via the
simulator switches but via the corresponding buttons on the touchpanel.
• the acknowledgement of errors and faults should still be possible via the simulator switch
"S_acknowledge" (%I0.7), and, in addition, also via the corresponding button on the
touchpanel.
What to Do
R
1. In the function "Mode", replace the variables "S_operationON" (%I0.1) and "S_operationOFF"
(%I0.0) with the corresponding DB tags (see picture). Remember to also take into account
that a hardware-based NC contact is connected to "S_operationOFF"
(%I0.0) and when pressing the "Plant OFF" button, a "TRUE" signal is sent.
T
2. Expand the function "Fault" in such a way that all error and fault acknowledgements which
were possible up until now via "S_acknowledge" (%I0.7), are now additionally possible via the
touchpanel, that is, the DB tag "InterfaceTP".acknowledgeFault.
3. In the function "Conveyor", replace the variables "S_right" (%I0.2) and "S_left" (%I0.3) with
SI
A R
Task
I N
From the project, all modified S7 blocks are to be transferred into the CPU and the entire Panel
A
project is to be transferred into the touchpanel.
What to Do
1. Download all S7 blocks into the CPU.
2. Download the Panel project into the touchpanel
R
(It is possible that the Transfer conditions have to be controlled and set.)
3. Carry out a function test by
− Switching the operating mode via the touchpanel.
T
− Jogging the conveyor model to the right and left with the help of the touchpanel while in
Manual mode (Plant OFF).
I
− Presetting a SETPOINT quantity and starting the part transportation while in Automatic
mode (Plant ON),
− Monitoring how the ACTUAL quantity is updated.
− Causing a conveyor fault, monitoring its display on the touchpanel and acknowledging it on
S
the touchpanel.
4. Correct – if necessary – your program and check the functions once more.
5. Save your project.
AR
Note
N
The following pages contain either further information or are for reference to complete a
topic.
AI
For more in-depth study we offer advanced courses and self-learning mediums.
TR
SI
AR
HMI tags
This indicates whether the tag/variable can be written from HMI / OPC UA at runtime. This
protective function integrated in the S7-1200/1500 operating system ensures that the HMI
device or OPC UA-Client does not overwrite certain tags/variables.
• "Accessible from HMI/OPC UA" (only S7-1200 and S7-1500):
The HMI device can only access online the tags/variables which have the attribute
"Accessible from HMI/OPC UA". This protective function integrated in the S7-1200/1500
operating system ensures that the HMI device or OPC UA-Client can neither read-access nor
write-access certain tags/variables. Tags/variables which are not "Accessible from HMI/OPC
UA", accordingly are also not "Visible in HMI Engineering".
SI
Note:
OPC UA is a standard which enables an operating system-independent and platform-
independent data exchange.
12.8.2. Manually Setting the Transfer Mode, Transfer Channel and Address
AR
N
Manually Setting the Transfer Mode, the Transfer Channel and the Address of a Panel
You can manually set the Transfer mode, the interface as well as the relevant address of the
panel via "Start Center > Settings >Transfer".
AI
TR
SI