PROFIBUS DP
SITRAIN
IK-PBSYS / HMI Devices Page 1 03/2007
Siemens AG 2007 - Subject to change without prior notice
Contents Page
HMI devices: TP 170B panel .............................................................................................................. 2
Interfaces on TP170B ........................................................................................................................ 3
WinCC flexible ................................................................................................................................... 4
Basic activities ................................................................................................................................... 5
Touch panel: Setting the interface for project transfer ....................................................................... 6
Hardware configuration: Runtime interface ...................................................................................... 7
WinCC flexible configuring interface .................................................................................................. 8
Defining the connection to the PLC .................................................................................................... 9
Requirements for HMI transfer ........................................................................................................... 10
Transfer settings in WinCC flexible ................................................................................................... 11
Exercise 1: Copy a touch panel project TP170B .............................................................................. 12
Exercise 2: Prepare the touch panel interface ................................................................................. 13
Exercise 3: Set a PG interface ......................................................................................................... 14
Exercise 4: Test the PROFIBUS DP ................................................................................................. 15
Exercise 5: Test the runtime interface ........................................................................................... 16
Exercise 6: Test the connection to the PLC ...................................................................................... 17
Exercise 7: Transfer a WinCC flexible project .................................................................................. 18
Exercise 8: Test a WinCC flexible project ........................................................................................ 19
Direct key functionality (DP slave) .................................................................................................... 20
Exercise 9: Configure an HMI device as a DP slave ........................................................................ 21
Exercise 10: Configure direct key functions ..................................................................................... 22
Exercise 11: Programmed access .................................................................................................... 23
SITRAIN
IK-PBSYS / HMI Devices Page 2 03/2007
Siemens AG 2007 - Subject to change without prior notice
Introduction An HMI device such as the TP170B Colour used in the training rack can
communicate with the CPU via a range of different data transfer media (bus
systems). The CPU data, i.e. its program run, can be visualized and monitored.
PROFIBUS In most cases, the PROFIBUS is used as the data transfer medium. The
transmission protocol used internally is the S7 protocol, i.e. the same one used by
STEP7 as an online protocol. Accordingly, the HMI device itself is not configured
as a DP slave, but merely as a bus node in the PROFIBUS subnet.
The disadvantage of the S7 protocol, however, is that it is slower than the
PROFIBUS DP protocol. If the HMI application includes time-critical functions
which require a faster protocol than the S7, it is now possible to configure the HMI
device as a DP slave.
Direct keys "Direct keys" allow a number of input and output signals (quantity depends on the
type of HMI device) to be exchanged in a high-speed cycle between the HMI
device (DP slave) and the DP master. The HMI device then communicates with
the CPU using two different methods:
1.Conventionally via HMI variables: Non-time-critical S7 protocol
2.Additionally via IO areas: High-speed DP protocol
Interfaces on TP170B
SITRAIN
IK-PBSYS / HMI Devices Page 3 03/2007
Siemens AG 2007 - Subject to change without prior notice
Interfaces The TP170B is provided with three different interfaces for connection to the PLC
or PC. Interface (3) IF1B is the most important of the three for the SIMATIC S7
environment. This is an RS485 interface which is used for both MPI and
PROFIBUS. The difference between the two is solely determined by the protocol
used.
For applications which require the TP170B to function as a DP slave, it is
connected to the PROFIBUS via this interface.
The firmware of the HMI device uses the RS485 interface in combination with the
PROFIBUS protocol to perform the following functions:
WinCC flexible
Advanced
Advanced demo
- Full scope of functions
Standard - Limited to max. 30 days
Compact
*) Option
Micro
E n g i n e e r i n g (ES)
R u n t i m e (RT)
RT options
SITRAIN
IK-PBSYS / HMI Devices Page 4 03/2007
Siemens AG 2007 - Subject to change without prior notice
WinCC flexible The Engineering System (ES) is the software you use to configure
Engineering System an interface for operating and monitoring machines and plant.
Runtime WinCC flexible Runtime (RT) is the software for process visualization on the
operator panel. You execute the project in process mode in WinCC Runtime.
The different panels are shipped with an operating system and the appropriate
Runtime version. Any additionally required Runtime components are installed with
the project on the panel.
Basic activities
PC/PG
WinCC flexible
PC/OP/TP
WinCE
Configuration Configuration
data data PC
Flash Flash
Source file
<Name>.hmi
Ethernet MPI
DP
PLC
PLC
SITRAIN
IK-PBSYS / HMI Devices Page 5 03/2007
Siemens AG 2007 - Subject to change without prior notice
The configuration data are stored in source files in your S7 project (directory
\HmiEs). The generation process produces a file of type "fwx" which is later
transferred to the target device
<Name>.fwx for Windows-based HMI systems
Editors Several editors (tools) with which individual object types can be configured have
been integrated into WinCC flexible. Each object is created using a symbolic
name. This symbolic name must always be entered when the object is created,
edited, referenced or deleted.
Timeout: 1 sec
Control
panel
Network Parameters
Transmission Rate: 1.5 Mbits/s
Profile: DP
Bus parameters...
Transfer settings OK X
Channel Directories
S7 transfer settings OK X
Channel 1:
Enable Channel MPI
Serial:
Remote control PROFIBUS
Channel 2:
MPI / Enable Channel
Properties...
PROFIBUS
Remote control Advanced
SITRAIN
IK-PBSYS / HMI Devices Page 6 03/2007
Siemens AG 2007 - Subject to change without prior notice
Configuration
Properties of the
interface Properties of the
PROFIBUS
interface
SITRAIN
IK-PBSYS / HMI Devices Page 7 03/2007
Siemens AG 2007 - Subject to change without prior notice
Communication The interface parameters (address and network) for a WinCC flexible project
settings integrated in STEP7 are assigned with the tool HW Config, as illustrated in the
screenshots above. The panel will later use these parameter settings to
communicate with the PLC or PLCs when Runtime is active or during process
control.
In the case of WinCC flexible projects which are not integrated in STEP7, these
parameters are defined with WinCC flexible when the "Connections" are
configured (see below).
Tools
Project
Editor area
Work area
Properties
Edition
SITRAIN
IK-PBSYS / HMI Devices Page 8 03/2007
Siemens AG 2007 - Subject to change without prior notice
Call WinCC flexible can be called directly from the SIMATIC Manager for projects
integrated in STEP7.
Following the software installation, the engineering interface is launched with a
basic setting. The key windows are opened.
Project window The Project window is the central control point for configuration. All components
and all available configuration editors of a project appear in a tree structure in the
Project window, and can be opened from there. Each editor is assigned a symbol
which you can use to identify the corresponding objects. Only those elements
which are supported by the selected operator panel are displayed in the project
window. In the project window you have access to the operator panel settings,
language settings and version management.
Work area The central configuration area in which the objects of the operator panel can be
processed using the active editor. Several editors can be open simultaneously.
Properties window The Properties window is used to edit the properties of selected objects (e.g.
displays, display objects, variables). The Properties window is only available in
editors where object properties have to be set.
Tool window The tool window contains all objects which can be configured in displays, and
permits access to libraries.
Output window The Output window displays all engineering system alarms produced, for
example, when generating a project.
Properties can be
edited only via
NETPRO
SITRAIN
IK-PBSYS / HMI Devices Page 9 03/2007
Siemens AG 2007 - Subject to change without prior notice
SITRAIN
IK-PBSYS / HMI Devices Page 10 03/2007
Siemens AG 2007 - Subject to change without prior notice
Notes
Transfer to panel
Check transfer
settings
SITRAIN
IK-PBSYS / HMI Devices Page 11 03/2007
Siemens AG 2007 - Subject to change without prior notice
Transfer Transfer is the transmission of the project to the operator panel on which
settings the project will run. The transfer settings entered here are relevant only for
transferring the project, but not for the subsequent exchange of data with the PLC
during process control.
Transfer mode The operator panel must be in "transfer mode" for the transfer operation.
Depending on how the interface parameters are set, the operator panel must
either be switched manually over to transfer mode or it will switch over
automatically.
SITRAIN
IK-PBSYS / HMI Devices Page 12 03/2007
Siemens AG 2007 - Subject to change without prior notice
Task description Copy the touch panel project "TP170B_Color" from project 08_HMI-Panels_DP"
into your own project.
The project contains a basic visualization application for the TP 170B and an
executable S7 program which is operated via the panel.
Timeout: 1 sec
Control
panel
Network Parameters
Transmission Rate: 1.5 Mbits/s
Profile: DP
Bus parameters...
Transfer settings OK X
Channel Directories
S7 transfer settings OK X
Channel 1:
Enable Channel MPI
Serial:
Remote control PROFIBUS
Channel 2:
MPI / Enable Channel
Properties...
PROFIBUS
Remote control Advanced
SITRAIN
IK-PBSYS / HMI Devices Page 13 03/2007
Siemens AG 2007 - Subject to change without prior notice
Task description The interface of the TP170B must be set as shown above so that the WinCC
flexible project can then be downloaded from the PG to the panel.
Before the interface can be parameterized, the Runtime application must be
terminated. A button for ending Runtime is generally displayed in the start screen.
When Runtime has been terminated, the "Loader" is displayed and this can be
used to activate the "Control panel" (see figure above). The Loader also appears
every time the voltage supply is restored.
Notes Channel: In addition to the serial transfer channel (channel 1), a second
channel (channel 2) for loading the project to the operator
panel can be selected.
Remote Control: The Runtime application need not be ended manually before
the WinCC flexible project loading process is started. The
panel automatically terminates Runtime and switches over to
transfer mode.
Advanced: Transmission parameter settings for MPI or PROFIBUS DP
SITRAIN
IK-PBSYS / HMI Devices Page 14 03/2007
Siemens AG 2007 - Subject to change without prior notice
Task description In order to ensure that the WinCC flexible project can be downloaded from the
PG to the touch panel, the PG interface parameters must be parameterized on
the PROFIBUS DP to match the transfer settings of the touch panel.
Procedure 1.Reconfigure the interface of your PG for PROFIBUS. Use the parameters
shown in the figure above.
Caution:
Do not select "PROFIBUS DP slave" in the "Applied interface
parameters" box
2.Connect the online cable of the PG to a PROFIBUS DP interface.
Test the
PROFIBUS DP interface
SITRAIN
IK-PBSYS / HMI Devices Page 15 03/2007
Siemens AG 2007 - Subject to change without prior notice
Use the "SIMATIC NET diagnosis" function (see figure above) to check whether
all nodes can be accessed via PROFIBUS.
Note The node properties "active" and "passive" indicate whether a node can initiate
communication with another node (active) or not (passive).
Configuration
Properties of the
interface Properties of the
PROFIBUS
interface
SITRAIN
IK-PBSYS / HMI Devices Page 16 03/2007
Siemens AG 2007 - Subject to change without prior notice
Task description In order to ensure that the Runtime application on the panel can communicate
with the S7 station during process control, the panel interface must be
parameterized with the hardware configuration tool.
Procedure Check the parameter settings of the panel interface using the hardware
configuration tool. If necessary, adjust the settings as required (see figure).
Check the network settings using the network configuring tool (NETPRO):
Connections
SITRAIN
IK-PBSYS / HMI Devices Page 17 03/2007
Siemens AG 2007 - Subject to change without prior notice
Task description Set up a connection so that the panel Runtime application can communicate with
your trainer PLC.
Procedure 1.Launch WinCC flexible by opening the WinCC flexible station TP170B_Color in
the SIMATIC Manager (see figure on left) and double click on "Connections" in
this screen
2.Check whether your S7 station has been set up as a connection partner.
3.Connect the WinCC flexible variables to the PLC variables by
selecting Options Re-connect select dialog options as illustrated
below ok (select all variables in the variable editor)
Transfer to panel
PROFIBUS address
(panel)
Transfer
SITRAIN
IK-PBSYS / HMI Devices Page 18 03/2007
Siemens AG 2007 - Subject to change without prior notice
Task description The specified WinCC flexible project "TP_170B_Color" must be downloaded to
the panel.
Procedure 1.Activate the transfer function and make the settings shown in the figure
2. Start the data transfer to the panel by selecting button
"Transfer"
SITRAIN
IK-PBSYS / HMI Devices Page 19 03/2007
Siemens AG 2007 - Subject to change without prior notice
Task description The WinCC flexible project "TP170B_Color" must be tested in conjunction with
the S7 program for correct functioning:
Procedure 1.Download all S7 blocks from project 08_HMI-Panels_DP" onto your CPU via
PROFIBUS and restart the system.
2.Select the "Belt" display and check whether the output fields are displaying the
following information correctly:
Status of initiators in stations 1 to 3 and the light barrier
Belt fault display
Operating states (system ON, manual and auto modes)
ACTUAL quantity
PROFIBUS DP
PROFIBUS - DP slave
(direct key functionality)
SITRAIN
IK-PBSYS / HMI Devices Page 20 03/2007
Siemens AG 2007 - Subject to change without prior notice
Initial situation The HMI device connected to PROFIBUS is exchanging data directly with the
CPU (using the S7 protocol) which has been assigned as the communication
partner in the WinCC flexible project.
These S7 packets are packed only for transport reasons into a PROFIBUS
message frame and transmitted via the PROFIBUS medium, i.e. the HMI device
is not connected to PROFIBUS as a DP slave.
Direct keys As a functional extension, "direct keys" provide a limited number of extra inputs
and outputs which can be transmitted much quicker in a PROFIBUS message
frame than the normal variables within the WinCC flexible configuration.
For this reason, they are primarily used as switching functions for high-speed
inputs. These inputs are referred to as direct keys. Their number is dependent
on the type of HMI device.
3.The S7 program has "quite normal" access to these values by using the
addresses assigned in stage 1 (input signal scanning).
Note The faster reaction time of the "direct keys" function cannot be detected without a
special measurement as it is only a matter of milliseconds faster than the normal
transmission time.
SITRAIN
IK-PBSYS / HMI Devices Page 21 03/2007
Siemens AG 2007 - Subject to change without prior notice
General The objects in the folder "Configured stations" are proxy objects (as for an I slave)
which can be dragged to the PROFIBUS subnet.
The HMI device is not displayed in the following screen unless it has already
been configured in STEP7, in which case it can be finally connected to
PROFIBUS.
2.The DP slave is finally connected to the master system with the Connect
button. The direct control key module for the TP170B is concealed behind
object TP170B and is dragged to an empty "slot" of the slave.
Finally, the input and output addresses can be adjusted if required.
SITRAIN
IK-PBSYS / HMI Devices Page 22 03/2007
Siemens AG 2007 - Subject to change without prior notice
Task description Your task is to configure two additional buttons in the TP 170B project ("Belt"
display). The "Direct key" is configured as a button function (e.g. a button which is
pressed).
Procedure 1.Assign the function Direct key from the folder Keyboard to both buttons.
2.Assign the correct bit number. The range of possible numbers corresponds to
the input area specified in the hardware configuration when the TP170B was
configured as a DP slave.
In this specific case, the input area is IB4 - IB7 (I4.0 corresponds to
bit 0).
"Direct" left I4.3
"Direct" right I4.2
3.Save and generate the modified TP 170B project.
4.Download the changes to the touch panel. Test the functions that you will
require, e.g. using a variable table, and monitor the signal states of the
assigned inputs in response to actuation of the buttons on the TP 170B
SITRAIN
IK-PBSYS / HMI Devices Page 23 03/2007
Siemens AG 2007 - Subject to change without prior notice
Programming A "Direct key" produces a "1" signal for as long as the key is pressed, i.e. as soon
as the key is released, it automatically generates a "0" signal. Signal states are
scanned in a similar way to standard access operations to the process images
(PII, PIA).
Note The faster reaction time of the "direct keys" function cannot be detected without a
special measurement as it is only a matter of milliseconds faster than the normal
transmission time.