Automation and Drives
Integrated PROFIBUS interface
PROFIBUS DP
SITRAIN IK-PBSYS / Integrated Interface
Page 1
03/2007 © Siemens AG 2007 - Subject to change without prior notice
Co n t en t s Pag e PROFIB PROFIBUS US DP - Mono-m Mono-mast aster er system system ...... ......... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ... 2 Example: Example: Modular Modular DP slaves slaves ET200M ET200M / ET200S ET200S .......... ............... .......... ........... ............ ........... .......... .......... ........... ........... .......... .......... ........... .......... ....
3
PROFIB PROFIBUS. US.com com as downlo download ad platfo platform rm ...... ......... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...
4
Post-i Post-inst nstall alling ing PROFIB PROFIBUS US DP slaves slaves
...... ......... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ..... ..
5
........... ................. ........... ........... ........... .......... ........... ............ ........... .......... .......... ........... ........... .......... ........... ........... .......... ........... ......... ...
6
...... ......... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ..... ..
7
Installing Installing a GSD file in STEP STEP7 7 Hardwa Hardware re config configura uratio tion n
Configuring Configuring the DP master master interface interface
........... ................ .......... .......... ........... ............ ........... .......... .......... ........... ............ ............ ........... .......... ........... ........... .......... .....
8
Config Configuri uring ng the PROFIBU PROFIBUS S DP master master system system ...... ......... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ..... ..
9
Properties Properties of the integral integral DP interface interface
........... ................. ........... ........... ........... .......... ........... ............ ........... .......... .......... .......... ........... ........... .......... ......... ........ ....
10
Properties Properties of the integral integral DP interface interface
........... ................. ........... ........... ........... .......... ........... ............ ........... .......... .......... .......... ........... ........... .......... ......... ........ ....
11
Configuring Configuring compact compact and modular modular slaves slaves
.......... ................ ........... .......... .......... .......... ........... ........... .......... .......... .......... .......... .......... .......... ........... ............ ......
12
........... ................ ........... ............ ........... .......... .......... .......... ........... ........... .......... .......... ........... ............ ............ .......... ........ ....
13
........... ................ .......... .......... ........... ........... .......... .......... ........... ............ ............ ........... .......... ........... ............ ........... ........... .......... .......... .......... ....
14
Exercise Exercise 1 : DP system configurati configuration on Description Description of S7 program program
Exercise Exercise 2 : "Diagnose "Diagnose hardware hardware online" online" Startup Startup behavior behavior
........... ................. ........... .......... .......... .......... ........... ............ .......... .......... ........... .......... ........... ........... .......... .......... .....
15
........... ................ .......... .......... .......... .......... ........... ........... .......... ........... ........... .......... .......... .......... .......... ........... ............ ............ ............ ............ ........... .......... ......... ....
16
Status Status and error displays displays
.......... ................ ............ ........... .......... .......... .......... .......... ........... ........... .......... ........... ........... .......... .......... .......... .......... ........... .......... .......... .......... ....
Access to configured addresses
17
........................................................................... ................................... .................................................................... ............................
18
........... ................ .......... .......... .......... ........... ............ ........... .......... ........... ............ ........... .......... .......... .......... .......... ........... .......... .......... .......... ....
19
Consistent Consistent data transfer transfer (2) ........... ................ .......... .......... .......... ........... ............ ........... .......... ........... ............ ........... .......... .......... .......... .......... ........... .......... .......... .......... .... Configuring Configuring consistent consistent data areas .......... ................ ........... .......... .......... ........... ............ ............ ........... .......... ........... ........... ........... ........... .......... .......... ......... ......... .....
20 21
If you you want want to know more
............ ................. .......... ........... ........... .......... .......... .......... ........... ............ ........... .......... .......... ........... ............ ........... .......... ........... ........... .......... .......
22
Exercise Exercise 3 : Configure Configure the ET 200M 200M (1) ........... ................ ........... ............ ........... .......... .......... ........... ........... .......... ........... ........... ........... ........... ........... .......... ......
23
Exercise Exercise 4 : Configure Configure the ET 200M 200M (2) ........... ................ ........... ............ ........... .......... .......... ........... ........... .......... ........... ........... ........... ........... ........... .......... ......
24
Exercise Exercise 5 : Signal Signal processi processing ng in in the ET 200M .......... ................ ............ ............ ........... .......... .......... .......... ........... ............ ........... .......... .......... ........... ...... Exercise Exercise 6 : Integrate Integrate the drive drive in in the HW Config Config ........... ................ .......... .......... .......... ........... ............ ........... .......... ........... ............ ........... ........... ........ ..
25 26
Exercise Exercise 7 : Control Control the drive via the the TP170B TP170B .......... ............... .......... .......... ........... ........... .......... .......... ........... ........... .......... .......... ........... ............ .......... ....
27
Consistent Consistent data transfer transfer (1)
SITRAIN trainin training g for Automation and Industrial Solutions
Page 1
IK-PBSYS Integrated Interface
Automation and Drives
PROFIBUS PROFIBUS DP DP - Mono-master Mono-master system system DP master system CPU 31x-2 PN/DP CPU 41x-…
e.g. ET 200 M as DP slave e.g. CPU 315-2 DP
SITRAIN IK-PBSYS / Integrated Interface
DP master
Page 2
03/2007 © Siemens AG 2007 - Subject to change without prior notice
You can use the following as DP masters: •
An S7-CP S7-CPU U with with int integ egrat rated ed DP mast master er int inter erfa face ce (e.g. (e.g. CPU CPU 414 414-2 -2,, etc etc.) .)
•
An int inter erfa face ce mod modul ule e whic which h is ass assig igne ned d to an an M7M7-CP CPU/ U/M7 M7-F -FM M
•
A CP CP in in con conju junc ncti tion on with with a CPU CPU (e.g (e.g.. CP CP 443 443-5 -5,, etc etc.) .)
•
An IM module with an AS400
Configuration wit h 'simp le' (modular (modular or compact) DP slaves slaves In this configuration, data are communicated between the DP master and simple DP slaves, i.e. I/O modules, via the DP master. The DP master polls each configured configured DP slave in its polling list within the DP master system in sequence and transmits the output data or receives input data. The I/O addresses utilized in the user program are automatically assigned by the engineering system, but can also be modified. A DP interface on a CPU or communications communications processor can function function as the DP master. On the AS400, an IM module can also be used as a DP master. If only one DP master and and its slaves are connected to a physical physical PROFIBUS DP subnet, the subnet is referred to as a mono-master system.
SITRAIN trainin training g for Automation and Industrial Solutions
Page 2
IK-PBSYS Integrated Interface
Automation and Drives
Example: Modular DP slaves ET200M / ET200S
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
ET 200M
Page 3
03/2007 © Siemens AG 2007 - Subject to change without prior notice
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.
Setting
1.
Slide the window on the interface module upward.
2.
Set the desired PROFIBUS DP address using the DIL switches.
3.
Please note that the lowest switch must not be added to the dual summation.
SITRAIN training for Automation and Industrial Solutions
Page 3
IK-PBSYS Integrated Interface
Automation and Drives
PROFIBUS.com as download platform
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 training for Automation and Industrial Solutions
Page 4
IK-PBSYS Integrated Interface
Automation and Drives
Post-installing PROFIBUS DP slaves
SITRAIN IK-PBSYS / Integrated Interface
Type files
Page 5
03/2007 © Siemens AG 2007 - Subject to change without prior notice
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 DP slaves below:
To integrate a new DP slave in the hardware catalog, take the actions described 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.
SITRAIN training for Automation and Industrial Solutions
Page 5
IK-PBSYS Integrated Interface
Automation and Drives
Installing a GSD file in STEP7
Installing the new generic station description (GSD)
New catalog entry
SITRAIN IK-PBSYS / Integrated Interface
Procedure
.
Page 6
03/2007 © Siemens AG 2007 - Subject to change without prior notice
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
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 Ad diti onal 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 s lave" to the master system by the usual method.
SITRAIN training for Automation and Industrial Solutions
Page 6
Install
new GSD files
IK-PBSYS Integrated Interface
Automation and Drives
Hardware configuration
SITRAIN IK-PBSYS / Integrated Interface
Functions
Page 7
03/2007 © Siemens AG 2007 - Subject to change without prior notice
The STEP 7 programming software permits menu-prompted parameter assignment for the distributed I/O devices as well as for the field devices on PROFIBUS DP. The main actions involved in this process include: •
Configuring the fieldbus system
•
Generating the address list for the master module
•
Setting the transmission rate on the fieldbus
•
Setting the failure characteristics
The STEP 7 programming software supports uniform programming and configuring of central and distributed I/Os. The target configuration of the PROFIBUS DP fieldbus is stored on the PROFIBUS DP master module. 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.
SITRAIN training for Automation and Industrial Solutions
Page 7
IK-PBSYS Integrated Interface
Automation and Drives
Configuring the DP master interface
Catalog / profile for PROFIBUS-DP
Integrated PROFIBUS DP interface
SITRAIN IK-PBSYS / Integrated Interface
DP slave types
Page 8
03/2007 © Siemens AG 2007 - Subject to change without prior notice
There are basically three different types of slave: • Modules with integrated digital/analog inputs and outputs (comp act DP slaves such as the ET200B). • Interface modules with assigned S5 or S7 modules (modu lar DP slaves such as the ET200M). • S7-200/300 stations with modules which can be configured as a DP slave (I slave, e.g. CPU 215-DP, CPU 315-2).
DP slave selectio n
To configure a DP slave, proceed as follows: 1.Select the desired compact DP slave (e.g. ET200B) or the interface module (e.g. IM153 for ET200M) for a modular slave from the "Hardware catalog". 2.Drag the symbol onto the symbol for the master system. The dialog box "Properties - PROFIBUS nodes" is opened. The following settings can be made here: Properties of the PROFIBUS subnet (baud rate, etc). The PROFIBUS address of the DP slave. 3.Acknowledge the settings with "OK". A configuration table is attached to the symbol which represents the I/O configuration of the compact slave or subrack of the modular slave. 4.For a modular DP slave, now insert the desired modules from the "Hardware catalog" into the configuration table. The modules are then addressed and parameterized in the same way as the central configuration.
Note
This method is not used to configure I slaves. The configuring process for intelligent slaves is described in a later chapter.
SITRAIN training for Automation and Industrial Solutions
Page 8
IK-PBSYS Integrated Interface
Automation and Drives
Configuring the PROFIBUS DP master system
Subnet for PROFIBUS
Insert 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 I/O devices
The term "distributed I/O devices" applies to all master systems comprising a DP master and DP slaves which are interconnected via a bus cable and use the DP protocol to communicate.
DP master
You can use the following as DP masters:
Procedure
•
An S7-CPU with integrated DP master interface (e.g. CPU 414-2, etc.)
•
A CP in conjunction with a CPU (e.g. CP 443-5, etc.)
To configure a master system, proceed as described below: 1.Select the PROFIBUS interface X2 on your CPU and insert a master system (menu command Insert Master system) 2.The "Properties - PROFIBUS nodes" dialog box is opened. The following properties can be defined in this dialog box: •
Create a new PROFIBUS subnet or open an existing one
•
Set the properties of the PROFIBUS subnet (baud rate, etc).
•
Specify the PROFIBUS address of the DP master.
3.Acknowledge the settings with "OK". The following symbol is displayed for the DP master system. This symbol is used as a "hanger" for the DP slaves.
SITRAIN training for Automation and Industrial Solutions
Page 9
IK-PBSYS Integrated Interface
Automation and Drives
Properties of the integral DP interface
Networked interface
DP master mode
SITRAIN IK-PBSYS / Integrated Interface
General
Page 10
03/2007 © Siemens AG 2007 - Subject to change without prior notice
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.
Operatin g 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 training for Automation and Industrial Solutions
Page 10
IK-PBSYS Integrated Interface
Automation and Drives
Properties of the integral DP interface
Relevant only for the connection of I slaves
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 training for Automation and Industrial Solutions
Page 11
IK-PBSYS Integrated Interface
Automation and Drives
Configuring compact and modular slaves Slave (ET 200S)
SITRAIN IK-PBSYS / Integrated Interface
DP slaves
Page 12
03/2007 © Siemens AG 2007 - Subject to change without prior notice
• Modules with integrated digital/analog inputs and outputs (compact DP slaves such as the ET200B). • Interface modules with assigned S5 or S7 modules (modular DP slaves such as the ET 200M, ET 200S). • S7 200/300 stations with modules which support the "Intelligent slave" function (e.g. CPU 215-DP, CPU 315-2).
DP slave selectio n
To configure a DP slave, proceed as follows: 1.Select the desired compact DP slave (e.g. ET200B) or the interface module (e.g. IM153 for ET200M) for a modular slave from the "Hardware catalog". 2.Drag the symbol onto the symbol for the master system. The dialog box "Properties - PROFIBUS nodes" is opened. The following settings can be made here: Properties of the PROFIBUS subnet (baud rate, etc). The PROFIBUS address of the DP slave. 3.Acknowledge the settings with "OK". A configuration table is attached to the symbol which represents the I/O configuration of the compact slave or subrack of the modular slave. 4.For a modular DP slave, now insert the desired modules from the "Hardware catalog" into the configuration table. The modules are then addressed and configured in the same way as the central configuration.
Note
This method is not used to configure I slaves. The configuring process for intelligent slaves is described in a later chapter.
SITRAIN training for Automation and Industrial Solutions
Page 12
IK-PBSYS Integrated Interface
Automation and Drives
Exercise 1 : DP system configuration
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 64 32 16 8 4 2 1
2.Check the set slave address. These are the switches on the IM 151-1 interface module. The example shows slave address setting "4". 3.Change the addresses of the mixed DI/DO module in universal rack UR0 to IB 88 and QB 88. Configure IB 8 and QB 8 for the input and output addresses respectively in the ET 200S. 4.Connect the ET 200S to the DP interface on the CPU. 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.
SITRAIN training for Automation and Industrial Solutions
Page 13
IK-PBSYS Integrated Interface
Automation and Drives
Description of S7 program DI
Simulator
DO
I 0.0
System_ON
I 0.1
System_OFF
System
.1
I 0.2 I 0.3
Jog_RIGHT MANUAL
.2 .3
I 0.4
AUTO / MANUAL
.4
I 0.5
Apply
.5
Jog_LEFT
.0
AUTO
I 0.6
.6
I 0.7
.7
Initiators Station 1 Station 2 "Ini1" "Ini2"
Belt motor Pushbutton "K_belt_RIGHT" "K_belt_LEFT" "T_Station1" "T_Station2" SITRAIN IK-PBSYS / Integrated Interface
Final check station "LB" light barrier
Indicator lamps "H_Station1" "H_Station2"
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.
FC15
System ON/OFF, operating modes (OM) MANUAL and AUTO The system is switched on via the simulator button I 0.0, it is switched off via button I 0.1 (NC contact). The operating mode System ON is indicated via the simulator LED Q 4.1. The operating mode MANUAL is switched on if it is selected via the simulator switch "AUTO/MANUAL" (I 0.4 ='0') and the simulator button "Apply" (I 0.5). The simulator LED Q 4.2 indicates that MANUAL mode is switched on. The operating mode AUTO is switched on if it is selected via the simulator switch "AUTO/MANUAL" (I 0.4 ='1') and the simulator button "Apply" (I 0.5). The simulator LED Q 4.3 indicates that AUTO mode is switched on.
FC16
Belt motor control In MANUAL mode (Q 4.2 = '1'), the belt motor can be jogged to the RIGHT (Q 8.5) using the simulator button "T_Jog_RIGHT" (I 0.2) and to the LEFT (Q 8.6) using "T_Jog_LEFT" (I 0.3). In AUTO mode, parts from Station 1 or 2 are transported to the final check station. The belt motor starts as soon as one of the two initiators places a part on the belt and the relevant s tation button is actuated. The belt stops as soon as the part has passed the light barrier for the final check station or when AUTO mode is interrupted.
FC17
Error and operational messages The indicator lamps on stations 1 and 2 - light up continuously at both stations when a new part can be put on the belt. - 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.
SITRAIN training for Automation and Industrial Solutions
Page 14
IK-PBSYS Integrated Interface
Automation and Drives
Exercise 2 : "Diagnose hardware online"
Module status (diagnostic buffer)
Online diagnosis of hardware
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
.......................................................................................................................... .......................................................................................................................... .......................................................................................................................... .......................................................................................................................... 6.Now re-insert the module in the ET 200S.
SITRAIN training for Automation and Industrial Solutions
Page 15
IK-PBSYS Integrated Interface
Automation and Drives
Startup behavior
PROFIBUS in RUN mode
SITRAIN IK-PBSYS / Integrated Interface
Startup behavior
Page 16
03/2007 © Siemens AG 2007 - Subject to change without prior notice
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 d ifferent 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 training for Automation and Industrial Solutions
Page 16
IK-PBSYS Integrated Interface
Automation and Drives
Status and error displays
Group fault (SF)
Bus fault (BUSF) Bus fault (BF)
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
BUSF/BF
The LED BUSF is installed for modules with a DP interface (e.g. CPU 315-2)
BUSF1, BUSF2
If the CPU features more than one DP interface, each interface has its own LED.
SF
Group fault LED: Basically displays every fault detected by the CPU, including faults on the DP BUS. In this case, one of the BUSF LEDs mentioned above lights up at the same time. Unless specially programmed (error OB), the CPU responds to a bus fault in the same way as to any other group fault by switching to the STOP state.
BF/BUSF LED flashes LED flashes during booting until all configured slaves are synchronized or if a slave which is already synchronized fails or signals a fault: Possible faults
• Scenario 1: Failure of a connected station • Scenario 2: At least one of the configured slaves cannot be accessed • Scenario 3: Configuring error (TARGET and ACTUAL configurations are not identical)
Response of t he CPU Call of OB 86 (when CPU is in RUN mode). CPU switches to STOP if OB 86 is not loaded. Remedy
• Check whether the bus cable is connected to all nodes or whether the bus is interrupted (terminating resistor!). • Check whether the slave is switched on. • Wait until the CPU has completed booting. If the LED does not stop flashing, check the DP slaves, the configuration or evaluate the diagnostic data of the failed DP slave.
SITRAIN training for Automation and Industrial Solutions
Page 17
IK-PBSYS Integrated Interface
Automation and Drives
Access to configured addresses PROFIBUS DP slaves
I/O addresses
SITRAIN IK-PBSYS / Integrated Interface
Addresses
Page 18
03/2007 © Siemens AG 2007 - Subject to change without prior notice
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 d irect I/O access method, e.g.L PEW 304 .
SITRAIN training for Automation and Industrial Solutions
Page 18
IK-PBSYS Integrated Interface
Automation and Drives
Consistent data transfer (1)
I/O address
SITRAIN IK-PBSYS / Integrated Interface
Data consistency
Page 19
03/2007 © Siemens AG 2007 - Subject to change without prior notice
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.
Ac cess t o bit s, byt es, words and double words If the data exchanged between the DP master and a DP slave need only be consistent within 1 byte, 2 bytes or 4 bytes, then the data can be accessed "normally" as for central I/O devices, i.e. directly via address areas. 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.
SITRAIN training for Automation and Industrial Solutions
Page 19
IK-PBSYS Integrated Interface
Automation and Drives
Consistent data transfer (2)
100(hex) = 256(dec)
SITRAIN IK-PBSYS / Integrated Interface
Basic principle
Page 20
03/2007 © Siemens AG 2007 - Subject to change without prior notice
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. Parameter
Declaration Data type
Memory area
LADDR
INPUT
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.
WORD I, Q, M, D, L,
constant.
Note:The address must be in hexadecimal format, e.g. the start address 256 means: LADDR:=W#16#100. RET_VAL
OUTPUT
INT
If an error occurs while the function is an error code. Note
RECORD
OUTPUT
ANY
I, Q, M, D, L being executed, the return value contains
I, Q, M, D, L:
Destination area or source area of user data on the CPU. This must be exactly the same length as the length configured for the module with STEP 7. Only the data type BYTE is permissible.
SITRAIN training for Automation and Industrial Solutions
Page 20
IK-PBSYS Integrated Interface
Automation and Drives
Configuring consistent data areas
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 training for Automation and Industrial Solutions
Page 21
IK-PBSYS Integrated Interface
Automation and Drives
If you want to know more
SITRAIN IK-PBSYS / Integrated Interface
Note
Page 22
03/2007 © Siemens AG 2007 - Subject to change without prior notice
The following pages provide additional information for reference.
SITRAIN training for Automation and Industrial Solutions
Page 22
IK-PBSYS Integrated Interface
Automation and Drives
Exercise 3 : Configure the ET 200M (1)
Bus interface for ET 200M
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 withOK .
SITRAIN training for Automation and Industrial Solutions
Page 23
IK-PBSYS Integrated Interface
Automation and Drives
Exercise 4 : Configure the ET 200M (2)
SITRAIN IK-PBSYS / Integrated Interface
Procedure
Page 24
03/2007 © Siemens AG 2007 - Subject to change without prior notice
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 comp ile to create new system data b locks 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 training for Automation and Industrial Solutions
Page 24
IK-PBSYS Integrated Interface
Automation and Drives
Exercise 5 : Signal processing in the ET 200M
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.
Procedure
1.Write the program as described above. 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. 4.Monitor the process values ONLINE with the variables table.
SITRAIN training for Automation and Industrial Solutions
Page 25
IK-PBSYS Integrated Interface
Automation and Drives
Exercise 6 : Integrate the drive in the HW Config
Bus interface for MM420
SITRAIN IK-PBSYS / Integrated Interface
Page 26
03/2007 © Siemens AG 2007 - Subject to change without prior notic e
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:
Procedure
1.Open the HW Config tool. 2.Open the HW catalog and select profile "DriveES". 3.Select the Micromaster 420 from directory SIMOVERT MICROMASTER4 and drag and drop it onto the PROFIBUS DP master system. 4.Enter PROFIBUS address 6 in screen "Properties – PROFIBUS interface MICROMASTER_4_PROFIBUS", select the subnet and accept the setting with "OK". 5.Select the device version, i.e. "1.0x" or "1.1x", specified for your training equipment in screen "Properties – SINAMICS". You will find this version on the rating plate of the MM420 (e.g. "Issue: A06/1.17") 6.In the "Configuration" tab of the "DP slave properties" screen, select PPO type 3 and assign I/O address 42 for exchanging data with the CPU (see screenshot). 7.Save, compile and download the configuration to the CPU.
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).
SITRAIN training for Automation and Industrial Solutions
Page 26
IK-PBSYS Integrated Interface
Automation and Drives
Exercise 7 : Control the drive via the TP170B
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 notic e
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. Tip: The control word for "Jog LEFT" is: W#16#067E 2.Commission the block 3.Call the "MM420" display on the touch panel 4.Test the functions described
SITRAIN training for Automation and Industrial Solutions
Page 27
IK-PBSYS Integrated Interface