Professional Documents
Culture Documents
PROFIBUS DP
SITRAIN
IK-PBSYS / Integrated Interface Page 1 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Contents Page
PROFIBUS DP - Mono-master system ............................................................................................. 2
Example: Modular DP slaves ET200M / ET200S .............................................................................. 3
PROFIBUS.com as download platform ............................................................................................. 4
Post-installing PROFIBUS DP slaves ............................................................................................... 5
Installing a GSD file in STEP7 .......................................................................................................... 6
Hardware configuration .................................................................................................................... 7
Configuring the DP master interface ................................................................................................. 8
Configuring the PROFIBUS DP master system ................................................................................ 9
Properties of the integral DP interface .............................................................................................. 10
Properties of the integral DP interface .............................................................................................. 11
Configuring compact and modular slaves ......................................................................................... 12
Exercise 1 : DP system configuration ............................................................................................... 13
Description of S7 program ................................................................................................................ 14
Exercise 2 : "Diagnose hardware online" .......................................................................................... 15
Startup behavior ............................................................................................................................... 16
Status and error displays .................................................................................................................. 17
Access to configured addresses ....................................................................................................... 18
Consistent data transfer (1) .............................................................................................................. 19
Consistent data transfer (2) .............................................................................................................. 20
Configuring consistent data areas .................................................................................................... 21
If you want to know more .................................................................................................................. 22
Exercise 3 : Configure the ET 200M (1) ............................................................................................ 23
Exercise 4 : Configure the ET 200M (2) ............................................................................................ 24
Exercise 5 : Signal processing in the ET 200M ................................................................................. 25
Exercise 6 : Integrate the drive in the HW Config .............................................................................. 26
Exercise 7 : Control the drive via the TP170B ................................................................................... 27
DP master system
CPU 31x-2 PN/DP
CPU 41x-…
SITRAIN
IK-PBSYS / Integrated Interface Page 2 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Example:
DP address
64
+ 32
+ 2
+ 1
___
= 99
* Only in the case of IM151, IM151 FO: provided for subsequent
enhancements. This switch must be in the OFF position.
SITRAIN
IK-PBSYS / Integrated Interface Page 3 03/2007
© Siemens AG 2007 - Subject to change without prior notice
ET 200M The modular I/O device ET 200M (DPV1 slave with up to 12Mbit/s) consists of:
• one IM 153 interface module,
• up to 8 S7-300 I/O modules and
• a power supply, if required.
There are no slot rules for the I/O modules. They can be combined in any way.
The ET 200M is connected to the PROFIBUS via an IM 153 interface module. It
can be connected to PROFIBUS with fiber-optic cables through integrated
interfaces on the IM 153-2 FO or through additional OLMs (optical link modules)
or optical bus terminals (OBTs).
ET 200S The IM151 is the interface module for connecting the ET200S to PROFIBUS DP.
The DP slave is connected to the main line through bus connectors or bus
terminals.
DP address The PROFIBUS address is used to specify which address is used to address the
distributed ET 200S I/O system on the PROFIBUS DP.
The PROFIBUS DP address for the ET 200S is set on the interface module by
means of DIL switches. The DIL switches can be found on the front of the
interface module, protected by a sliding window. Permitted PROFIBUS DP
addresses are 1 to 125. Each address can only be assigned once on the
PROFIBUS DP.
SITRAIN
IK-PBSYS / Integrated Interface Page 4 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Task description I want to connect a DP slave to the DP master system, but the slave in question
is not included in the module catalog for the hardware configuration because it is
supplied by another manufacturer or is a brand new development. I don't have the
GSD file for this DP slave. Where can I get this GSD file?
Download The answer can be found in the FAQs provided by Customer Support on the
INTERNET under
Article ID : 186875.
The Siemens GSD files can be ordered directly from Siemens from the following
Internet addresses (as of July 2004):
German: GSD files http://www.ad.siemesnd.de/csi/gsd
English: gsd files http://www.ad.siemesnd.de/csi_e/gsd
Alternatively, the GSDs can also be downloaded from
http://www.ad.siemesnd.de/simatic-cs under Product Support ("PROFIBUS
GSD files").
Other manufacturers
GSD files from other manufacturers can be obtained from the PNO's GSD library
(www.profibus.com Æ Products) or from the websites of the relevant device
manufacturers.
You can then import them with STEP7 tool “HW CONFIG“.
SITRAIN
IK-PBSYS / Integrated Interface Page 5 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Type files To enable you to select the slave from the hardware catalog in the tool hardware
configuration, STEP 7 requires a GSD or a type file for every DP slave.
All the properties of a DP slave are stored in its GSD file. GSD files comply with
the PROFIBUS standard. Type files comply with the Siemens specification.
Every type of DP slave supplied by SIEMENS AG has a type file.
DP slaves supplied by other manufacturers are shipped with a GSD or a type file.
Integrating To integrate a new DP slave in the hardware catalog, take the actions described
DP slaves below:
1. Select the menu command Options Æ Install new GSD file.
2. In the dialog box which is then displayed, open the
drive/directory in which the relevant GSD file is stored.
The slave is listed in the "Hardware catalog" window (only in the
"Standard" catalog profile!) under "PROFIBUS-Additional Field Devices"
and is available there for configuration.
New
catalog entry
SITRAIN
IK-PBSYS / Integrated Interface Page 6 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Procedure 1. Open the STEP7 tool HW CONFIG. Close the opened configuration so that
only the tool itself remains open.
2. Select the menu command Options Æ Install new GSD files
. 3. Now select the source directory to which you saved the GSD files
beforehand and click on the appropriate GSD file in the directory.
Then click on the Open button.
4. As a result of these actions, the new slave(s) will be displayed for selection
in folder Additional field devices in the Standard catalog profile.
5. Now open the hardware configuration again in which you want to configure
the DP system and "attach" the "new slave" to the master system by the
usual method.
Hardware configuration
SITRAIN
IK-PBSYS / Integrated Interface Page 7 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Diagnostics The diagnostic function can be used to localize and remove errors easily
during commissioning and operation. For this purpose, the PG is connected to the
PROFIBUS DP or directly to the appropriate I/O and field device.
Catalog / profile
for PROFIBUS-DP
Integrated
PROFIBUS DP
interface
SITRAIN
IK-PBSYS / Integrated Interface Page 8 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Note This method is not used to configure I slaves. The configuring process for
intelligent slaves is described in a later chapter.
Subnet for
Insert PROFIBUS
master system
Properties
of the PROFIBUS
subnet
SITRAIN
IK-PBSYS / Integrated Interface Page 9 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Distributed The term "distributed I/O devices" applies to all master systems comprising a DP
I/O devices master and DP slaves which are interconnected via a bus cable and use the DP
protocol to communicate.
Networked interface
DP master mode
SITRAIN
IK-PBSYS / Integrated Interface Page 10 03/2007
© Siemens AG 2007 - Subject to change without prior notice
General The "General" tab provides information about the type and location of the DP
interface.
The short description, the information below it and the order number are identical
to the data in the "Hardware catalog" window. The "Name" field contains the short
description of the module which you can change as required. When you rename
the entry, the new name appears in the configuration table.
Interface The type and address of a subnet interface can be found under "Interface".
"Networked" (yes/no) indicates whether a module is connected to a configured
subnet. By selecting the "Properties" button, you can change the address or the
subnet properties or create / select another subnet.
For interfaces which can be parameterized as either an MPI or PROFIBUS DP
interface: Click on the field to toggle the operating mode of the interface.
Addresses tab The diagnostic address for the PROFIBUS DP interface is displayed. The
operating system of the CPU uses this address, for example, to signal failure of
the DP interface.
Operating mode tab This dialog box is used to specify whether the CPU is to be operated as a
DP slave (=intelligent DP slave) or as a DP master (default).
In contrast to the integrated interface, CPs allow either the DP protocol or the
FDL protocol to be selected, which means that DP functionality can be completely
deactivated in this tab with the No DP setting.
For DP masters, this means that no DP master system is set up or, if one exists
already, it is decoupled from this interface. Operating modes which the interface
does not support cannot be selected.
SITRAIN
IK-PBSYS / Integrated Interface Page 11 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Configuration This tab is relevant only for DP slave mode and displays the key data for the
following configurations.
tab • Data communication between the intelligent DP slave (I slave) and the
assigned DP master: In this case, the "Mode" column contains "MS"
(master slave).
• Direct data communication between this I slave and another
DP slave (slave-to-slave communication). In this case, the "Mode"
column contains "DX“ Direct Data Exchange).
A common requirement of these configurations is that addresses need to be
assigned. One address assignment between the local station (I slave) and
the address area of the DP partner requires one line.
The lines are always sorted in ascending order. If you mark one line and then
click the "down arrow" or "up arrow" button in the right margin of the tab sheet,
you can change the position of the line and thus the order.
The following information is displayed in the lower area of the dialog box for the
selected line:
• In the case of a master/slave configuration: The DP master and the name
of the station which contains the DP master
• In the case of direct data exchange (slave-to-slave communication): Sender
and station name
SITRAIN
IK-PBSYS / Integrated Interface Page 12 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Note This method is not used to configure I slaves. The configuring process for
intelligent slaves is described in a later chapter.
OFF ON
64
32
16
8
4
2
1
SITRAIN
IK-PBSYS / Integrated Interface Page 13 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Task description Your task is to commission the DP system for your training device in such a way
that the belt model can be controlled via the ET 200S with the same range of
functions.
Procedure 1.Add the distributed station ET 200S (additional connection option for the
belt model) to the existing configuration.
OFF ON 2.Check the set slave address. These are the switches on the IM 151-1 interface
64 module. The example shows slave address setting "4".
32 3.Change the addresses of the mixed DI/DO module in universal rack
16 UR0 to IB 88 and QB 88.
8 Configure IB 8 and QB 8 for the input and output addresses respectively in the
4 ET 200S.
2 4.Connect the ET 200S to the DP interface on the CPU.
1
5.Download the configuration to the CPU after "Save and compile".
6.Check whether the configuration contains errors. The fault LEDs Group Fault
(SF) and Bus Fault (BUSF) on the CPU must not be illuminated.
Notes • In order to combine the addresses of the two input and output modules for the
ET 200S into one byte, click on button "Compress addresses". Make sure
that you select the two modules beforehand.
• Changes in the PROFIBUS address of a slave are not registered until the
system is restarted.
7.Connect the belt model to the ET 200S.
8.Load the supplied S7 program from the S7 project
06_Integrierte_Schnittstelle_TN.zip and commission it.
Description of S7 program
DI Simulator DO
I 0.0 System_ON .0
I 0.1 System_OFF System .1
I 0.2 Jog_RIGHT MANUAL .2 Initiators
I 0.3 .3 Station 1 Station 2 Final check station
Jog_LEFT AUTO "Ini1" "Ini2" "LB" light barrier
I 0.4 AUTO / MANUAL .4
I 0.5 Apply .5
I 0.6 .6
I 0.7 .7
Belt motor
"K_belt_RIGHT" Pushbutton Indicator lamps
"K_belt_LEFT" "T_Station1" "T_Station2" "H_Station1" "H_Station2"
SITRAIN
IK-PBSYS / Integrated Interface Page 14 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Procedure Load all blocks of the S7 program "Conveyor belt" (S7 archive:
04_Integrierte_Schnittstelle.zip) to the CPU and learn to understand the operating
principle of the program using the description below as a guide.
- flash at a frequency of 1 Hz only at the station in front of whose initiator the new
part is located.
- flash at a frequency of 2 Hz at both stations while a part is being transported.
Module status
(diagnostic buffer)
SITRAIN
IK-PBSYS / Integrated Interface Page 15 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Task description Your task is to analyze DP slave failures using the "Diagnose hardware" online
function.
Procedure 1.Remove the module from slot 5 on the ET 200S.
2.In the menu Options Æ Customize Æ View, select the quick view.
3.Now select menu commands PLC Æ Diagnosis/Settings Æ
Diagnose hardware.
4.Select the line of the failed DP slave and then click on the
module status button.
5.Analyze the messages in the Module status DP slave
window:
Messages ..........................................................................................................................
..........................................................................................................................
..........................................................................................................................
..........................................................................................................................
Startup behavior
PROFIBUS in RUN
mode
SITRAIN
IK-PBSYS / Integrated Interface Page 16 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Startup behavior As soon as the DP configuration has been downloaded to the DP master,
this begins to boot the DP master system. This boot process comprises two
stages for every configured DP slave (LED BF/BUSF flashes):
1.The physical presence of the DP slave is tested on the basis of its configured
bus address. To pass this test, the slave need only be connected to the bus
cable with the configured address and must be switched on.
2.Comparison of configured target configuration with the real actual configuration.
If the slave meets the criteria to pass both these tests, it is entered as "OK" in the
polling list.
This means that the master can immediately begin a cyclical data exchange with
this slave.
This status is signaled on the slave by illumination of the green LED. If the slave
fails either of the boot tests, the red LED on the slave remains illuminated and the
master does not exchange data with it.
If all configured slaves are "OK", the master deactivates the flashing LED
BF/BUSF.
CPU behavior The checkbox "Boot for different target/actual configurations" allows the
behavior of the CPU to be configured for instances where the DP master is
unable to synchronize all configured slaves within a predefined time period
(default setting: 20 seconds).
When the box is checked, the CPU switches to the RUN state when the timer
runs down; when the box is unchecked, it switches to the STOP state.
SITRAIN
IK-PBSYS / Integrated Interface Page 17 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Error displays: Various fault states on the CPU are signaled by different LEDs
Response of the CPU Call of OB 86 (when CPU is in RUN mode). CPU switches to STOP if OB 86 is
not loaded.
PROFIBUS DP slaves
I/O addresses
SITRAIN
IK-PBSYS / Integrated Interface Page 18 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Addresses The addresses of distributed I/Os are accessed in the S7 program in exactly the
same way as if they were the addresses of central I/Os.
If the addresses are outside the areas for PII, or the areas for PIO in the case of
outputs, the program uses the direct I/O access method, e.g. L PEW 304 .
I/O address
SITRAIN
IK-PBSYS / Integrated Interface Page 19 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Data consistency The term "consistent data" is used to describe connected areas of multiple input
or output bytes which are related in terms of time, i.e. which carry the same time
stamp.
These always cause problems for an S7 CPU if the area is exactly 3 bytes in
length or longer than 4 bytes. In such cases, the CPU is unable to transfer the
data area in one step.
In the context of PROFIBUS DP, data consistency does not refer to data
transmissions between the master and slaves (these are always consistent), but
to the transfer of data between the CPU and the DP master.
Examples L IW24
L PIW 304
T QD400
U I 30.4
= Q 45.2
The addresses used here can be the addresses of either central and distributed
I/Os. The S7 program cannot identify the difference.
100(hex) = 256(dec)
SITRAIN
IK-PBSYS / Integrated Interface Page 20 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Basic principle Data areas of > 4 bytes in length are transmitted consistently by means of the
following two system functions
- SFC14 "DPRD_DAT" for data transfers from the master to the CPU,
- SFC15 "DPWR_DAT" for data transfers from the CPU to the master
.
These two functions ensure that the DP master does not start exchanging data
with individual DP slaves via PROFIBUS until the data blocks have been
transmitted completely to or from the master.
SFC14: Configured start address from the input area of the module
from which data are to be read.
SFC15: Configured start address from the output area of the module
to which data are to be written.
SITRAIN
IK-PBSYS / Integrated Interface Page 21 03/2007
© Siemens AG 2007 - Subject to change without prior notice
S7 program Whether data can be transferred consistently and in which lengths is not solely
dependent on the use of system functions SFC 14 and SFC 15.
DP master Must often also be specified when the slave is configured in the master system.
Whether and which data areas can be configured as consistent generally
depends on the specific slave type, i.e. this information is stored in its GSD file.
Select the "Addresses" tab of the DP slave in the hardware configuration.
Depending on the type of DP slave, the consistent area contains default values
and cannot be changed or you can define the consistent area with the fields
"Length", "Unit" and "Consistent over" (e.g. for I slaves).
SITRAIN
IK-PBSYS / Integrated Interface Page 22 03/2007
© Siemens AG 2007 - Subject to change without prior notice
SITRAIN
IK-PBSYS / Integrated Interface Page 23 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Task description Configure the ET200M as a DP slave with address 8 on the existing DP master
system of the internal CPU interface.
Procedure 1.Remove the analog module from the central rack and insert it in the
ET200M again next to the IM153-1 interface module.
2.Set bus address 8 with the DIL switches on the IM153-1.
Remember: Changes to addresses do not take effect until the power
supply for the DP slave is switched off and on again!
3.Use the PROFIBUS cable (terminating resistors!) to connect the DP master of
the CPU to the IM153-1 module of the ET200M.
4.Open the hardware configuration for your station
5.If necessary, display the hardware catalog. Navigate to folder ET200M in folder
PROFIBUS DP, drag the IM153-1 module designed for your training case and
drop it on the bus cable.
6.Select 8 as the DP address in the next screen and accept your settings with OK
.
SITRAIN
IK-PBSYS / Integrated Interface Page 24 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Procedure 7. Remove the analog module from slot 7 in the central rack and insert it directly
in slot 4 on the ET200M (1). All settings for the module will be transferred
automatically at the same time (e.g. including the addresses 304 ... 307).
As an alternative, you can drag the module out of the hardware catalog under
the ET200M into slot 4 (2). With this method, however, you must enter the
module settings again.
8.Use Save and compile to create new system data blocks and download the
modified configuration to your CPU.
Result The DP system is booted. If your configuration matches the physical hardware
configuration, the flashing LED BUSF/BF indicator LEDs on the DP master and
the BF LED on the IM153-1 stop flashing and go out.
If necessary, check the terminating resistors on the bus cable again as well as the
slave address set on the ET200M.
The master system is now fully configured. In the next exercise, you now need to
link access to the analog module signals into the S7 program.
SITRAIN
IK-PBSYS / Integrated Interface Page 25 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Task description The analog value must be read into the S7 program via OB35 and processed
within a specific time frame. After read-in, the analog value represents a weight
with a value that is converted (scaled) to a weight range of between 0 and 500
grams and displayed on the simulator.
2.Then download the two blocks OB35 and FC105 to your CPU.
3.Alter the voltage at the analog input by turning the left-hand potentiometer on
the simulator. As you do this, observe the display on the simulator.
SITRAIN
IK-PBSYS / Integrated Interface Page 26 03/2007
© Siemens AG 2007 - Subject to change without prior notice
General Cyclical data communication between the CPU and MM4420 via PROFIBUS
must be set up in the hardware configuration. To do this, proceed as follows:
Result When the MM420 has been successfully parameterized and integrated in the
hardware configuration of the S7 station, the LED on the MM420 PROFIBUS
interface lights up green (flashing or continuous).
S7 program
P
r
o
f
i
b
u
s
D
P
SITRAIN
IK-PBSYS / Integrated Interface Page 27 03/2007
© Siemens AG 2007 - Subject to change without prior notice
Task description It must be possible to switch the drive on and off from the touch panel. When
continuous operation is deactivated, the MM420 can be jogged to the right and
left with the corresponding keys. When continuous operation is activated, the
drive operates at the speed set via the potentiometer on the MM420 training
device.
Procedure 1.Program the new block "FC_MM420" (FC 42) as illustrated in the screenshot.