TIA MICRO1 10E Connecting HMI KTP600

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

SIMATIC S7-1200 Basic Course

Contents 10
10. Connecting an HMI device ................................................................................... 10-2
10.1. Task Description: Operating the ‘Plant’ via the Touchpanel ............................................... 10-3
10.2. Introduction to HMI: Data Exchange between Touchpanel and CPU................................ 10-4
10.2.1. Buttons and Input / Output Fields ....................................................................................... 10-5
10.2.2. WinCC - Basic Configuration Interface ............................................................................... 10-6
10.2.3. Adding an HMI Device ........................................................................................................ 10-7
10.2.4. Configuring the IP Address of a Touchpanel ...................................................................... 10-8
10.2.5. Networking a Touchpanel ................................................................................................... 10-9
10.2.6. Configuring an HMI Connection ........................................................................................ 10-10
10.2.6.1. HMI Connection: Entering the CPU Password ................................................................. 10-11
10.2.7. Setting the IP Address on the Touchpanel ....................................................................... 10-12
10.2.8. Downloading an HMI Project into the Touchpanel............................................................ 10-13
10.3. Adjusting the S7 Program with "Rewire" ........................................................................... 10-14
10.4. Exercise 1: Copying the Touchpanel Project .................................................................... 10-15
10.4.1. Exercise 2: Networking the Touchpanel ........................................................................... 10-16
10.4.2. Exercise 3: Configuring the HMI Connection .................................................................... 10-17
10.4.3. Exercise 4: Checking the HMI Tag Connections .............................................................. 10-18
10.4.4. Exercise 5: Setting the IP Address on the TP ................................................................... 10-19
10.4.5. Exercise 6: Downloading the HMI Project into the Touchpanel ........................................ 10-20
10.4.6. Exercise 7: Operating the ‘Plant’ via the Touchpanel ....................................................... 10-21
10.5. Additional Information ....................................................................................................... 10-22
10.5.1. HMI device wizard ............................................................................................................. 10-23

TIA-MICRO1 –Connecting an HMI device


Training Document V16.00.00 10-1
SIMATIC S7-1200 Basic Course

10. Connecting an HMI device

At the end of the chapter the participant will ...

... be able to set the interface for the touchpanel

... be familiar with the principle of data exchange between touchpanel


and CPU using tags

... be able to commission a touchpanel project

… be able to adjust a STEP 7 program

TIA-MICRO1 –Connecting an HMI device


10-2 Training Document V16.00.00
SIMATIC S7-1200 Basic Course

10.1. Task Description: Operating the ‘Plant’ via the Touchpanel


DI
I 0.0 S_ON
4 7 1 1
I 0.1 S_OFF(NC)
I 0.2 S_Right
I 0.3 S_Left
DO

P_Operation Q 4.1

I 0.7 S_Ackn. P_Fault Q 4.3

I 1.1 S_FAult1. P_Fault1 Q 4.5


I 1.2 S_FAult2. P_Fault2 Q 4.6
I 1.3 S_FAult3. P_Fault3 Q 4.7
AI / AO DI/ DO

Industrial
Ethernet

Task Description
The touchpanel project is to be commissioned and the S7 program of the controller is to be
adjusted in such a way that…
• the functions "Operation ON/OFF" and "Jog Right/Left" are no longer realized via the
simulator switches but via the buttons on the Touchpanel
• the acknowledgement of a conveyor fault should still be possible via the simulator switch
"S_Acknowledge" (I 0.7), and, in addition, also via the corresponding button on the
Touchpanel
• the SETPOINT quantity is no longer constant 3, but can be specified via an input/output field
on the Touchpanel

TIA-MICRO1 –Connecting an HMI device


Training Document V16.00.00 10-3
SIMATIC S7-1200 Basic Course

10.2. Introduction to HMI:


Data Exchange between Touchpanel and CPU

"S_Left"
(M30.3)
Status '0' / '1'

Update
• PROFIBUS e.g. every 500ms
• Industrial Ethernet

Press button "Set Bit"


Let go of button "Reset Bit"

Tags
Data is exchanged between SIMATIC S7 and the HMI system via tags. In the configuration of the
HMI device, the screen objects, such as buttons and input/output fields are linked to HMI tags
which in turn are connected to PLC tags of the CPU. The HMI system cyclically exchanges the
values between these tags. Data is transferred cyclically between SIMATIC S7 and the HMI
system, that is, process variables are cyclically read by the HMI device depending on the
configured update time.

HMI Tags
HMI tags can be connected to the global PLC tags or to the following global data areas of the
CPU:
• Data blocks (DB)
• Bit memories (M)
• Inputs (I) and outputs (Q)
• Peripheral inputs and outputs
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.

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 handled 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.

TIA-MICRO1 –Connecting an HMI device


10-4 Training Document V16.00.00
SIMATIC S7-1200 Basic Course

10.2.1. Buttons and Input / Output Fields

Input / Output
field

Button

Event

Action

Buttons
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 picture above). The "Events" of a button are
used to specify for which event which system function is to be executed.

I/O Fields
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.

TIA-MICRO1 –Connecting an HMI device


Training Document V16.00.00 10-5
SIMATIC S7-1200 Basic Course

10.2.2. WinCC - Basic Configuration Interface

Tools,
such as, Buttons,
Input / output fields
Working area

HMI Device

Details view

Properties,
such as, of a button

Project Window
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
support" and the "version management" can also 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.

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
must be set.

Toolbox Window
The toolbox window contains all configurable objects which can be configured in screens and
permits access to libraries.

TIA-MICRO1 –Connecting an HMI device


10-6 Training Document V16.00.00
SIMATIC S7-1200 Basic Course

10.2.3. Adding an HMI Device

Portal view

Project view

Adding an HMI Device


New HMI devices can be added in both the Portal view and the Project view. More than anything
else, attention must be paid to the device data such as article (order) number and version
number.

TIA-MICRO1 –Connecting an HMI device


Training Document V16.00.00 10-7
SIMATIC S7-1200 Basic Course

10.2.4. Configuring the IP Address of a Touchpanel

This address must also be


Select interface
set manually on the TP

PROFINET Interface of the Touchpanel


Regardless of whether the Devices & networks editor is in the Devices view or the Network view,
the settings of the PROFINET interface (IP address and subnet mask) can be made in the
"Properties" tab in the Inspector window for a selected HMI device interface.
If an online connection between the HMI device and the CPU is to be established, both devices
must be assigned the same subnet mask and IP addresses that are in the same subnet.

TIA-MICRO1 –Connecting an HMI device


10-8 Training Document V16.00.00
SIMATIC S7-1200 Basic Course

10.2.5. Networking a Touchpanel

Show / Hide
IP addresses

Networking
During networking, devices are connected to a subnet. The device interface must be compatible
with the type of network. The devices are networked with the "Devices & networks" editor in the
"Network" view by connecting the device interfaces using drag & drop.

TIA-MICRO1 –Connecting an HMI device


Training Document V16.00.00 10-9
SIMATIC S7-1200 Basic Course

10.2.6. Configuring an HMI Connection

Configuring HMI Connections


In configuring HMI connection(s), the communications partners are defined with which the HMI
device will later exchange data in the process control phase. The HMI device can also be
connected to or exchange data with several controllers.
There can also be controllers in the same network with which the HMI device does not exchange
data. Then, the HMI device is "networked" with these controllers, but it is not "connected".

TIA-MICRO1 –Connecting an HMI device


10-10 Training Document V16.00.00
SIMATIC S7-1200 Basic Course

10.2.6.1. HMI Connection: Entering the CPU Password

Password for
HMI access

Connection
The configured connections are visible in the Connections of the HMI device.

Password Query for HMI Accesses


To get access rights to a CPU that is password-protected, the HMI device must log on to the CPU
with a password when Runtime is started. This password must be specified in the Connections
configuration of the HMI device (see picture bottom right).

TIA-MICRO1 –Connecting an HMI device


Training Document V16.00.00 10-11
SIMATIC S7-1200 Basic Course

10.2.7. Setting the IP Address on the Touchpanel

Transfer Settings OK

Channel 1:
Ethernet X Enable Channel

Advanced X Remote Control


Profinet Settings OK

IP - Address
Loader V01.00.00.01_19 Control Panel OK
Specify an IP address

Transfer
IP address 192 168 111 101

Start Subnet Mask 255 255 255 0


Transfer
Control
Panel

IP Address of the Touchpanel


The interface of the touchpanel must be set to the same IP address and subnet mask as it is also
configured in the offline project.

Remote Control
You can initiate the loading of the WinCC flexible project without having to first manually end the
Runtime of the HMI device. The Panel automatically ends the Runtime and switches to the
Transfer Mode.

TIA-MICRO1 –Connecting an HMI device


10-12 Training Document V16.00.00
SIMATIC S7-1200 Basic Course

10.2.8. Downloading an HMI Project into the Touchpanel

1xR

Downloading an HMI Project into the Touchpanel


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
that the current project status is always transferred. 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 linked
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 into the
CPU.
It is also advisable to execute the "Compile > Software (rebuild all blocks)" command occasionally
to reduce the time required for compiling delta data in current engineering sessions.

TIA-MICRO1 –Connecting an HMI device


Training Document V16.00.00 10-13
SIMATIC S7-1200 Basic Course

10.3. Adjusting the S7 Program with "Rewire"

1xR

Adjusting the S7 Program using "Rewire"


So that the plant can be operated via the touchpanel, PLC tags must be used in the S7 program
which can be read or overwritten by the touchpanel. That is, that the variables used up until now
in the S7 program must be replaced accordingly with tags which can be read or overwritten by the
touchpanel.
Another possibility is to "rewire" the variables used up until now in the S7 program as shown in
the picture. With this so-called "rewiring" of a variable, the symbolic name of the variable is kept,
but it is assigned a different absolute address which is read or overwritten by the touchpanel.
"Rewiring" can be carried out directly on the tag in the Block Editor (as shown in the picture). The
changes are adopted immediately in the PLC tag table and thus in all program blocks.
Rewiring can also be done directly in the PLC tag table. The changes immediately affect all
program blocks.

TIA-MICRO1 –Connecting an HMI device


10-14 Training Document V16.00.00
SIMATIC S7-1200 Basic Course

10.4. Exercise 1: Copying the Touchpanel Project

Task
Your project currently doesn’t contain an HMI device. Instead of a completely new configuration,
you are to copy a prepared panel project from the global library "Micro1_Lib" into your project.

What to Do
1. Using drag & drop, copy the library element "Touchpanel" from the global library "Micro1_Lib"
into your project (see picture)
2. Save your project

TIA-MICRO1 –Connecting an HMI device


Training Document V16.00.00 10-15
SIMATIC S7-1200 Basic Course

10.4.1. Exercise 2: Networking the Touchpanel

Show / Hide
IP addresses

This address must also be


set manually on the TP

Task
The added touchpanel is to be networked with the Ethernet network.

What to Do
1. In the Project tree, start the "Devices & networks" editor and switch to the "Network" view
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. The network is created;
the associated subnet and the parameters appropriate for the network (IP address and subnet
mask) are automatically created
3. ‘Show’ the IP addresses of the CPU and the touchpanel using the button highlighted in the
picture

TIA-MICRO1 –Connecting an HMI device


10-16 Training Document V16.00.00
SIMATIC S7-1200 Basic Course

10.4.2. Exercise 3: Configuring the HMI Connection

1. Select
Connections

2. Use drag & drop


to drag a connection 3. Rename connection

Task
Now that the TP is networked with the Ethernet network, an HMI connection between the TP and
the CPU must be created. This connection is to give the name "TP-CPU" because this name is
already used in panel project from the library.

What to Do
1. In the Project tree, start the "Devices & networks" editor and switch to the "Connections" view
and there select "HMI connection"
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. The network is created
and given a default name
3. Drag open the window containing the connection table (see picture) and rename the
connection "TP-CPU"

TIA-MICRO1 –Connecting an HMI device


Training Document V16.00.00 10-17
SIMATIC S7-1200 Basic Course

10.4.3. Exercise 4: Checking the HMI Tag Connections

Task
Several HMI tags are already connected to PLC tags (inputs and outputs whose addresses are
defined by the conveyor model ‘wiring’). Others still must be connected by you.

What to Do
1. Open the "HMI tags" of the HMI device
2. Connect the HMI tags that are not yet connected to the corresponding PLC tags
3. Save your project

TIA-MICRO1 –Connecting an HMI device


10-18 Training Document V16.00.00
SIMATIC S7-1200 Basic Course

10.4.4. Exercise 5: Setting the IP Address on the TP

Transfer Settings OK

Channel 1:
Ethernet X Enable Channel

Advanced X Remote Control


Profinet Settings OK

IP - Address
Loader V01.00.00.01_19 Control Panel OK
Specify an IP address

Transfer
IP address 192 168 111 101

Start Subnet Mask 255 255 255 0


Transfer
Control
Panel

Task
The interface of the touchpanel is to be set as shown in the picture so that the configuration can
then be loaded into the panel.
Runtime must be exited before the interface can be assigned parameters. For this, a button for
exiting Runtime is generally provided in the Start screen. When Runtime has been exited, the
"Loader" appears through which the " Control Panel" can be activated. The Loader also appears
every time power is restored.

What to Do
1. Exit the Runtime of the Touchpanel
2. Activate the Control Panel
3. Select "Transfer" by double-clicking on it
4. Implement the settings shown in the picture
5. Go back to the Loader by closing the windows with "OK"
6. Activate the "Transfer" button so that the touchpanel waits for a connection to be established
by the PG

TIA-MICRO1 –Connecting an HMI device


Training Document V16.00.00 10-19
SIMATIC S7-1200 Basic Course

10.4.5. Exercise 6: Downloading the HMI Project into the Touchpanel

1xR

Task
From the now complete project, all S7 blocks will be downloaded once more from the
programming device into the CPU and the entire panel project will be transferred from the
programming device into the touchpanel.

What to Do
1. Completely compile the entire CPU program and the entire panel project
2. In the Inspector window, in the "Compile" tab, check whether the compilation was successful.
If need be, make the necessary corrections
3. Download all S7 blocks into the CPU
4. Download the panel project into the Touchpanel
5. Save your project

TIA-MICRO1 –Connecting an HMI device


10-20 Training Document V16.00.00
SIMATIC S7-1200 Basic Course

10.4.6. Exercise 7: Operating the ‘Plant’ via the Touchpanel

DI
S_ON "S_OperationON" "S_OperationOFF
4 7 1 1 (M30.0) (M30.1)
S_OFF(NC)
S_Right
S_Left
DO

P_Operation

S_Ackn. P_Fault
"S_Left" "S_Right"
(M30.3) (MW20)
S_FAult1. P_Fault1
S_FAult2. P_Fault2
S_FAult3. P_Fault3

"S_AcknHMI" "MW_SETP" "MW_ACT"


(M30.7) (MW22) (MW20)

Task
The touchpanel project is to be commissioned and the S7 program of the controller is to be
adjusted in such a way that …
• the functions "Operation ON/OFF" and "Jog Right/Left" are no longer done using the
simulator switches but instead are done using the touchpanel buttons
• acknowledgement of conveyor faults should be possible, as before, via the simulator switch
"S_Acknowledge" (I 0.7), and in addition via the corresponding button on the Touchpanel
• the SETPOINT quantity is no longer to be constant 3, but can be specified via an input/output
field on the touchpanel (the display of the ACTUAL quantity is already configured)
What to Do
1. Establish the functions "Operation ON / OFF" and "Jog Left / Right" by rewiring the variables
"S_ON", "S_OFF (NC)", "S_Right" and "S_Left" used up until now to the absolute addresses
M30.0, M30.1, M30.2 and M30.3 shown in the picture
2. Establish the function "Acknowledge fault" by also connecting the memory bit "M_AcknHMI"
(M30.7) shown in the picture in addition to the already connected simulator switch
"S_Acknowledge" (I 0.7)
3. Establish the function "Setpoint" by exchanging the constant (=3) used in the program with
the memory word "MW_SETP" (MW22)
4. Download all modified blocks into the CPU
5. Check all required functions
6. Save your project

TIA-MICRO1 –Connecting an HMI device


Training Document V16.00.00 10-21
SIMATIC S7-1200 Basic Course

10.5. Additional Information

TIA-MICRO1 –Connecting an HMI device


10-22 Training Document V16.00.00
SIMATIC S7-1200 Basic Course

10.5.1. HMI device wizard

Device Wizard
The HMI device wizard can be used to preset some settings for the device to be inserted. It’s a
step-by-step dialog-based wizard.

TIA-MICRO1 –Connecting an HMI device


Training Document V16.00.00 10-23

You might also like