MN s7-Cps-pb 76 Te
MN s7-Cps-pb 76 Te
MN s7-Cps-pb 76 Te
Release 09/2011
C79000−G8976−C181−05
Classification of Safety-Related Notices
This manual contains notices which you should observe to ensure your own perso-
nal safety, as well as to protect the product and connected equipment. These noti-
ces are highlighted in the manual by a warning triangle and are marked as follows
according to the level of danger:
Danger
! indicates that death or severe personal injury will result if proper precautions are
not taken.
Warning
! indicates that death or severe personal injury can result if proper precautions are
not taken.
Caution
! with warning triangle indicates that minor personal injury can result if proper
precautions are not taken.
Caution
without warning triangle indicates that damage to property can result if proper
precautions are not taken.
Notice
indicates that an undesirable result or status can result if the relevant notice is
ignored.
Note
highlights important information on the product, using the product, or part of the
documentation that is of particular importance and that will be of benefit to the
user.
Warning
! This device and its components may only be used for the applications described in
the catalog or the technical description, and only in connection with devices or
components from other manufacturers which have been approved or
recommended by Siemens.
This product can only function correctly and safely if it is transported, stored, set
up, and installed correctly, and operated and maintained as recommended.
Before you use the supplied sample programs or programs you have written
yourself, make certain that no injury to persons nor damage to equipment can
result in your plant or process.
EU Directive: Do not start up until you have established that the machine on which
you intend to run this component complies with the directive 89/392/EEC.
Warning
! This software may only be used for the applications described in the catalog or the
technical description, and only in connection with software products, devices, or
components from other manufacturers which have been approved or
recommended by Siemens.
Before you use the supplied sample programs or programs you have written
yourself, make certain that no injury to persons nor damage to equipment can
result in your plant or process.
Caution
Prior to startup, note the information and follow the instructions in the latest docu-
mentation. You will find the ordering data for this documentation in the relevant
catalogs or contact your local Siemens office.
Siemens AG
Industry Automation
Industrial Communication
Postfach 4848, 90327 Nürnberg Germany Technical data subject to change.
S7-CPs for PROFIBUS Configuring and Commissioning
SiemensA−4
Aktiengesellschaft G79000-G8976-C181−04 Release 09/2011
C79000−G8976−C181−05
This manual...
Description Manual
“Primer”
Installation / Part B
commissioning Characteristics
Operator controls/
displays
Operating instructions
Technical specifications
The examples described in “Primer” can also be found in the project folder for
sample programs after you have installed STEP 7.
Audience
This manual is intended for installation personnel, programmers of STEP 7
programs and service personnel.
Notice
If functions are described that require higher versions, this is indicated by an addi-
tional icon.
Example:
Notice
Please note that the availability of new functions depends on the device type you
are using. You can check which functions your module supports in the description
in the Properties dialog of the module in STEP 7 and in the catalog in HW Config.
SIMATIC NET Quick Start CD: Samples Covering all Aspects of Communication
The Quick Start CD that can be ordered separately is a treasure-trove of
sample programs and configurations.
You can order this directly over the Internet at:
http://support.automation.siemens.com/WW/view/en/21827955
http://www.automation.siemens.com/net/index_00.htm
(General information
or
http://support.automation.siemens.com/WW/view/en
This symbol appears in the margin to draw your attention to useful tips.
Where you see this symbol, you should also refer to additional information in the
basic help system of STEP 7.
This symbol indicates where detailed context-sensitive help is available. You can
F1 display these help texts with the F1 key or by clicking on the “Help” button in the
relevant dialog.
Conventions
References to other manuals and documentation are indicated by numbers in
slashes /.../. These numbers refer to the titles of manuals listed in the References
section of the Appendix.
Contents − Part A
1 Communication via PROFIBUS CPs in S7 Stations . . . . . . . . . . . . . . . . . . . . . . . A−16
1.1 PROFIBUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−17
1.2 SIMATIC S7 Communication With a PROFIBUS CP . . . . . . . . . . . . . . A−18
1.2.1 Type of Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−18
1.2.2 The Communication Services of the PROFIBUS CPs . . . . . . . . . . . . . A−19
1.2.3 Configuration and Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−20
1.3 PG/OP Communication on PROFIBUS . . . . . . . . . . . . . . . . . . . . . . . . . . A−21
1.3.1 PG Communication with STEP 7 over PROFIBUS . . . . . . . . . . . . . . . . A−22
1.3.2 OP Operation: Connecting Operator Interface Devices via PROFIBUS A−23
1.4 S7 Communication on PROFIBUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−24
1.5 S5-compatible Communication (SEND/RECEIVE Interface)) . . . . . . . A−28
1.6 PROFIBUS DP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−30
1.6.1 Network Configuration with One DP Master . . . . . . . . . . . . . . . . . . . . . . A−32
1.6.2 DP Multimaster Network Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . A−33
1.6.3 Multimaster Network Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−34
1.6.4 DP Slave Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−35
1.7 Networking Stations with STEP 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−36
1.7.1 Network/Project Variant: One Subnet − One Project . . . . . . . . . . . . . . . A−38
1.7.2 Network/Project Variant: SIMATIC S5 and Other Devices on the
Subnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−39
1.7.3 Network/Project Variant: Two or More Subnets − One Project . . . . . . A−40
1.7.4 Network/Project Variant: One Subnet − Several Projects . . . . . . . . . . . A−41
1.7.5 Network/Project Variant: Several Subnets in Several Projects . . . . . . A−43
2 Characteristics of PROFIBUS CPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−44
2.1 Communications Processors for S7-300 . . . . . . . . . . . . . . . . . . . . . . . . . A−44
2.2 Communications Processors for S7-400 . . . . . . . . . . . . . . . . . . . . . . . . . A−46
2.3 Attaching to PROFIBUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−47
2.3.1 Electrical Attachment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−47
2.3.2 Optical Attachment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−48
2.4 Slot Rules and further Information on the SIMATIC S7−300 Series . . A−50
2.4.1 Permissible Slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−50
2.4.2 Number of SIMATIC NET CPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−50
2.4.3 Multicomputing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−50
2.4.4 CPU Connection Resources and Optimized Utilization . . . . . . . . . . . . . A−51
2.5 Slot Rules and further Information on the SIMATIC S7−400 Series . . A−52
2.5.1 Permissible Slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−52
2.5.2 Number of SIMATIC NET CPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−52
Contents − Part B
see CP-specific description
on Manual Collection
or via Internet:
CP 342−5 / 342−5 FO: http://support.automation.siemens.com/WW/view/en/8773570
CP 343−5: http://support.automation.siemens.com/WW/view/en/8778841
1.1 PROFIBUS
Definition
PROFIBUS is the network for the cell and field area in the open, heterogeneous
SIMATIC NET communications system.
Physically, PROFIBUS is an electrical network based on a shielded twisted pair or
an optical network using fiber optic cable.
Standardized Transmission
The PROFIBUS network corresponds to the European Process and Fieldbus
standard PROFIBUS EN 50170 Vol. 2.
Ethernet
(ETHERNET,
IEEE 802.3)
PROFIBUS
(EN 50170, PROFIBUS, Vol. 2)
AS-Interface
(AS-i, Actuator-Sensor Interface)
PROFIBUS CP
PROFIBUS CP
S7/M7-400
S7-300
Interfaces / Services /
Possible types of communication Protocols
PG/OP communication over
S7 communication − S7 Protocol (Application Layer)
PG/OP communication
PG/OP communication is used to download programs and configuration data,
to run tests and diagnostic functions, and to control and monitor a plant from
OPs.
S7 communication
The S7 communication forms a simple and efficient interface between SIMATIC
S7 stations and PGs/PCs using communication function blocks.
S5-compatible Communication (SEND/RECEIVE Interface)
The SEND/RECEIVE interface allows program-controlled communication on a
configured connection from a SIMATIC S7 PLC to another SIMATIC S7 PLC, a
SIMATIC S5 PLC and to PCs/PGs.
Depending on the module type, the S7-CPs support the following communication
options:
CP 343-5
S7-400/S7-400H CP 443-5
Basic
CP 443-5
Extended
S5-115U to -155U/H PC
S7-400
Field device
S7-300
S5-95U
S5-95U/DP Master
S5-95U/DP Slave
DP PROTOCOL
FMS PROTOCOL
FMS PROTOCOL
S7-400 SEND/RECEIVE SEND/RECEIVE S5-95U/DP master/slave:
DP PROTOCOL SEND/RECEIVE
DP PROTOCOL
S5-115U to -155U/H: DP PROTOCOL
SEND/RECEIVE
DP PROTOCOL
FMS PROTOCOL
1) PC only as client
2) If you also want the S7−300 to be a client (possible with the CP 342−5), you will require communication blocks and a connection
configuration.
To connect and configure the PROFIBUS CP, you require the STEP 7 project
engineering software.
STEP S7 for PROFIBUS also provides a wide range of diagnostic functions for the
various types of communication.
Application
PG/OP communication provides functions that are already integrated in every
SIMATIC S7/M7/C7 device.
A distinction must be made between the following two types of function:
PG Operation
PG operation with STEP 7 PLCs on PROFIBUS means the following:
− You can use the complete range of functions of STEP 7 on PROFIBUS.
− You can use programming, diagnostic, operating and monitoring functions on
all modules in the SIMATIC S7 PLC via PROFIBUS.
OP Operation
PG/OP communication on PROFIBUS allows the operation and monitoring of
all modules in a SIMATIC S7 PLC using operator interface systems (TD/OP).
The PROFIBUS CP acts as a “communications relay” that relays the PG/OP
communication via PROFIBUS.
MPI
attachment
or
PROFIBUS attachment
PROFIBUS
S7 − 300
S7 − 400 PROFIBUS CP
PROFIBUS CP
Requirements
Operation allowing operator interface functions is possible when the following
conditions are met:
A PROFIBUS CP is installed in the operator interface device.
The CPs in the S7 stations have a PROFIBUS address (node initialization −
see Section 3.3.8).
Procedure
To use the S7 communication, you address the required module in the SIMATIC
S7 PLC from your operator interface device. For more detailed information, refer to
the description of your operator interface device.
Application
S7 communication via PROFIBUS allows program-controlled communication using
communication SFBs/FBs and configured S7 connections. Per job, up to 64
Kbytes of user data can be transmitted.
The CP acts as an “S7 communications relay” that relays the communications
functions via PROFIBUS
From the perspective of the user, S7 communication is identical over PROFIBUS
and Industrial Ethernet.
Stations
Two situations must be distinguished depending on device type and plant
configuration:
Client and server functionality at both ends (S7 connections configured
at both ends)
S7 connections can be operated between the following nodes with the entire
functionality of S7 communication:
− between S7-300 and S7-400 S7 stations (and also between each other);
− between S7 stations and PG/PC stations with a PROFIBUS CP.
M7
PROFIBUS
PUT / GET
BSEND / BRCV
USEND / URCV
PUT / GET
PROFIBUS
PG/PC Station
Ethernet
IE/PB Link
PG/PC Station
PROFIBUS
PUT / GET
Figure 1-4 PG/PC Station Communicates with S7 Stations on an Underlying PROFIBUS or Ethernet
Network via a Gateway
For more detailed information on the features supported by your PROFIBUS CP,
refer to the manual /2/.
Configuring S7 Connections
Create S7 connections to use S7 communication for data exchange between two
SIMATIC S7 stations.
For more detailed information, refer to the STEP 7 Description /10/.
2) for S7-300
Notice
Please remember the following points regarding data consistency in your user pro-
gram:
In the CPU of the S7 station, the read or written information is taken from the S7
user program into the operating system or copied from the operating system to the
S7 user program in blocks of 8 or 32 bytes (depending on the firmware version).
If information in the word or double-word format is located across such bounda-
ries, data inconsistency may arise during transmission using S7 communication!
For more detailed information, refer to the STEP 7 documentation /9/.
Application
Data transmission on a configured FDL connection is suitable for the transmission
of related blocks of data between two or more PROFIBUS stations.
The following must be distinguished:
Specified FDL connection
The communications nodes are specified by configuring connections.
Unspecified FDL connection (free layer 2 access)
The communications nodes are identified by address information in the
communication job of the user program. This means that up to 126 nodes can
be reached via one configured unspecified FDL connection providing they
support FDL connections.
Broadcast
All the nodes ready to receive broadcast messages can be reached on
PROFIBUS.
Multicast
All the nodes belonging to the multicast group can be reached on PROFIBUS.
1) The previous name of the SEND/RECEIVE interface on FDL connections was S5S5 connections
Stations
FDL connections allow program-controlled communication on PROFIBUS between
a SIMATIC S7 PLC and the following:
SIMATIC S7 PLC with PROFIBUS CP
SIMATIC S5 PLC with PROFIBUS CP (for example CP 5430/31)
SIMATIC S5-95U with PROFIBUS interface
PC stations with PROFIBUS CP (for example CP 5613)
PROFIBUS
SIMATIC S5 SIMATIC
with CP 5430/31 S5-95U PG/PC with PROFIBUS CP
Figure 1-5 SIMATIC S7 PLC with Possible Communication Partners on FDL Connections
1.6 PROFIBUS DP
Application
Data transmission on PROFIBUS DP provides a standardized interface (EN 50170
Vol. 2) for the transfer of process input data and process output data between a
SIMATIC S7 PLC and field devices (DP slaves).
The data exchange on PROFIBUS DP is characterized by the fast cyclic data
exchange between the DP master and DP slaves.
Method
The user program in the SIMATIC S7 PLC controls and monitors communication
over PROFIBUS-DP using special SIMATIC S7 blocks of the type FC (functions −
S7-300 only 1)). The FCs handle the following tasks:
The transfer of process output data from a specified data area on the S7 CPU
to the field device
The entry of process input data read from the field device into a specified data
area on the S7-CPU
The handling of monitoring and diagnostic jobs
1) with an S7-400, there is direct I/O access and for special tasks there are SFCs.
PG/PC as
DP master S7 − 300 PROFIBUS CP
(class 1) DP master (class 2)
STEP 7
NCM S7 for
PROFIBUS
PROFIBUS
DP slaves
according to the
DP standard
Figure 1-6 PROFIBUS DP System with Possible DP Slaves from Siemens or other Vendors
Characteristics
In a network configuration with one master, one DP master (active station) and no
further active station can be operated on the PROFIBUS.
Network Configuration
The following diagram illustrates a possible network configuration with one
PROFIBUS CP as the DP master.
S7 − 300 PROFIBUS CP
DP master
(class 1)
PROFIBUS
DP Slave
Process inputs/outputs
Characteristics
A multimaster configuration with DP masters means the operation of more than
one DP master each with its own DP master system on one PROFIBUS bus.
Network Configuration
The following diagram illustrates a possible network configuration with more than
one PROFIBUS CP as the DP master.
PROFIBUS
DP Slave DP Slave
Process inputs/outputs
Characteristics
In this situation, the multimaster configuration means the simultaneous operation of
a DP master system and other master-slave systems, for example FMS, on the
same PROFIBUS.
FMS Master
An FMS master (for example SIMATIC S5 PLC with a CP 5431 or SIMATIC
S7-400 with CP 443-5 Basic / SIMATIC S7-300 with CP 343-5) communicates with
the FMS slaves assigned to it according to the field bus standard PROFIBUS EN
50170 Vol. 2 /14/.
PROFIBUS
DP FMS
DP Slave FMS
slave
Process inputs/outputs
Figure 1-9 Bus Configuration with PROFIBUS DP and FMS (More than One Master)
Application
The SIMATIC S7-300 with the PROFIBUS CP in the DP slave mode is suitable for
applications in which local intelligent preprocessing of signals is required.
Network Configuration
The following diagram illustrates the PROFIBUS CP as a DP slave along with
devices that can be operated as DP masters.
PROFIBUS
Process inputs/outputs
Configuring
To allow SIMATIC stations and “other stations” to communicate with each other,
the networks must be configured in the STEP 7 projects.
Configuring a network or subnet involves the following:
1. You create one or more subnets of the required subnet type in the project.
2. You select the properties of the subnet. Normally the default settings are
adequate.
3. You connect the station “logically” to the subnet.
4. You set up connections for communication.
Networking in a Multiproject
STEP 7 as of Version V5.2 supports configuration in a multiproject.
Using a multiproject, for example, you can create a project for distributed editing by
various editors and distribute the stations to the projects according to their editors.
To allow this, functions are available for branching and merging (sub) projects.
Interproject subnets and connections can be created.
Notice
FMS connections between stations in different projects are not supported in
a multiproject.
Tools
The SIMATIC Manager provides convenient tools for configuring and documenting
networks (also graphically with NetPro).
The chapter describing network configuration in /9/ and the online help system also
contain information about configuring SIMATIC S7 networks.
Variants
Before configuring networks with STEP 7, you should be aware of the various
configurations possible in the STEP 7 project. The following configurations are
typical for stations networked with CPs:
These variants will be used as a basis to illustrate how real configurations can be
created in STEP 7 projects.
S7-400/1
S7-300/1
System
“Production”
PROFIBUS subnet 1
S7-300/2
Project
Network objects
S7-400/1
System S7-300/1
“Production” Non-SIMATIC
PROFIBUS
subnet 1
SIMATIC
S5
S7-300/2
Network objects
S7-400/1
PROFIBUS
subnet 1
S7-300/1 S7-300/2
View in a STEP 7 Project
You can create the subnets in one STEP 7 project and configure the stations for
communication.
Project
Network objects
S7 400/1 S7 − 400/2
PROFIBUS
subnet 1
Organization in a Multiproject
User-friendly and consistent configuration of such communication is supported in
STEP 7 as of Version V5.2 with the multiproject.
The functions for multiprojects in STEP 7 allow the following:
Several projects can be managed in one multiproject and edited separately
Projects can be branched and merged
Two different strategies can be distinguished in a multiproject:
Several employees work at the same time on a multiproject in a networked
environment. The projects of the multiproject are in different network folders. In
this case, all connection partners are available for configuring connections.
One employee manages the multiproject centrally. This person creates the
structures for projects (when necessary locally) and contracts individual projects
out for external editing. The central configuration engineer then returns these
projects to the multiproject and synchronizes the interproject data with system
support and where necessary with the required interproject functions.
In this case, agreement is necessary, for example, regarding the assignment of
connection names (reference) because it will be far easier when synchronizing
the projects to bring connections with identical connection names together.
The topic of multiprojects is dealt with in detail in the STEP 7 basic help.
Here, you will find information on the following topics:
Requirements for interproject functions
How to create multiprojects
How to create a new project in a multiproject
How to separate a project from a multiproject
How to include projects in the multiproject
How to synchronize projects in a multiproject
Moving stations within a multiproject (when a station is moved from one project
of a multiproject to another project of the same multiproject (for example using
drag & drop), the interproject connections are retained).
Possible problems in distributed projects and tips on how to avoid them
Ethernet (1)
PROFIBUS CP
PROFIBUS (1)
S7 − 300/1 S7 − 300/2
Organization in a Multiproject
If you use a multiproject organization, follow the steps below to connect the
S7-400/1 station to the PROFIBUS (1) subnet:
Create a subnet of the type PROFIBUS in both subprojects and merge these two
subnets in NetPro.
CP 342-5 CP 342-5 FO
CP 343-5
(Duplex sockets for
(9-pin sub-D female optical connection)
connector)
Status and
error displays
Mode selector
Figure 2-1 Example: Front View of the CPs 342-5 / 342-5 FO / CP 343-5
Legend
1 9−pin D−sub female connector
2 Duplex sockets for optical connection
3 Status and error displays
4 Mode selector switch
5 Connection for power supply and functional ground
Mode selector
PROFIBUS interface
(9-pin sub-D female
connector)
The following options are available for electrical attachment of the CPs to
PROFIBUS:
Bus Connector (Fast-Connect)
The bus cable is led directly to the CP and attached to the CP using the bus
connector.
Bus Terminal
The bus cable is connected at the bus terminal (6GK1 500-0AA10). The CP is
connected using the cable integrated in the bus terminal.
Bus connector
Bus cable
Bus terminal
Bus cable
FO
OLM
OBT
Bus cable
Note
For data rates higher than 1.5 Mbps (12 Mbps), the optical link module approved
for higher data transmission rates must be used.
FO cable: PROFIBUS
PCF or plastic FO cable
In the SIMATIC S7/M7-300 there is no set slot assignment for the SIMATIC NET
CPs. Slots 4 to 11 are permissible (1, 2 and 3 cannot be used for CPs).
The SIMATIC NET CPs can be installed both in the central rack and in an
extension rack, linked to the central rack via an IM 360/IM 361 (K-bus connection).
2.4.3 Multicomputing
Note that when using older S7-300 CPUs (up to September 1999), a maximum of
four S7 type connections for CP communication are supported. Of these four
connections, one is reserved for a PG and another for an OP (HMI = Human
Machine Interface). The newer CPUs (from 10/99 onwards) support up to 12 S7
connections, CPU 318-2DP supports 32 S7 connections.
As a result, the older S7-300 CPUs have only two “free” S7 connections available.
These two connections can be used for S7 communication, for PROFIBUS-FMS,
or for longer data with Industrial Ethernet.
If you use CPs that support multiplexing of OP connections and S7 communication
with loadable communication blocks, only one connection resource is occupied
when the multiplex channel is used.
An S7-400 CP can be inserted both in the central rack and in the extension rack
with a K bus interface. For the total number of CPs you can install, please refer to
the information on the relevant CP in the “Properties” chapter.
In the SIMATIC S7/M7-400 there is no set slot assignment for the SIMATIC NET
CPs. Slots 2 to 18 are permissible. Note, however, that depending on the power
supply module installed, slot 1 may also occupy slots 2−3.
Note
PROFIBUS-DP cannot be used in the extension rack.
The number of SIMATIC NET CPs that can be operated simultaneously is limited
by the specific characteristics of the CPU. The exact number can be found in the
CP-specific section of this manual.
2.5.3 Multicomputing
Note that in the S7-400 CPU, one S7 connection is reserved for a PG and a further
one for an OP (HMI = Human Machine Interface).
PG connection via MPI/integrated PROFIBUS-DP interface:
To execute ONLINE functions (for example module diagnostics) from a PG on
an S7-400 CP via the MPI/integrated PROFIBUS-DP interface, two connection
resources are necessary on the S7-400 CPU. These two connection resources
should be taken into account in the number of S7 connections.
Example: The CPU 412-1 has sixteen free resources for S7 functions available.
If a PG is to be used for diagnostics on the S7-400 CP and is connected to the
MPI/PROFIBUS-DP interface, two connection resources are required on the
S7-400 CPU, so that 14 connection resources remain available.
PG connection via PROFIBUS or Industrial Ethernet
If the PG is connected to the LAN (PROFIBUS or Industrial Ethernet), in order
to execute PG functions on the S7-400 CPU only one connection resource on
the S7-400 CPU is necessary.
Notice
The chart below shows the basic steps. Please read the device-specific instruc-
tions in “Installation and Commissioning” in the description of your CP (Manual
Part B).
S7 − 300 / 400
Installation
The functions for configuring a CP are available automatically after installing
STEP 7.
Functions
The functions for configuring a CP consists of the following:
CP-specific index dialogs that you call using the properties dialog box of the
modules.
Dialog functions for connection configuration.
Diagnostics functions that you obtain as follows:
− Using the “Diagnostics” tab in the Properties dialog
− Using the standard Start menu of Windows with which you can call the
SIMATIC program group
Functions displayed with SIMATIC STEP 7 NCM S7... in the Start menu of
Windows:
− Diagnostics
− Firmware loader
Completed configuration
data in the STEP 7 project
necessary steps
optional steps
Aims
To be able to attach the SIMATIC stations to a subnet, you create the subnet in
your project. This means that all the parameters for the entire subnet are managed
centrally.
Procedure
It is advisable to create the subnet before you configure the stations since the
assignment of the SIMATIC stations is then performed largely automatically.
It is also possible to create the subnet at a later point in time when configuring a
CP. This is explained in more detail later in the chapter.
Follow the steps outlined below:
1. Select the project in the SIMATIC Manager.
2. Select Insert "Subnet PROFIBUS.
Result: An object of the type network is created in the project. This allows all
the SIMATIC stations created in the project to be attached to this subnet.
3. If you prefer a NetPro graphic network display, select the network object
”PROFIBUS” and confirm with Edit " Open Object.
Figure 3-2 Graphical Network Representation − here with stations already networked
From this graphical representation, you can also access all the functions for
networking and configuring connections with PROFIBUS CPs.
You can also create the subnets in NetPro! Open the catalog using the menu
command Insert " Network Objects.
Organization in a Multiproject
If you use the multiproject form of organization, this has the following effects when
creating subnets.
You create subnets initially in the subprojects as described above. To be able to
network S7 stations, you will, for example, need to create a suitable subnet of the
type Industrial Ethernet in each subproject.
If this is physically a subnet that extends beyond the boundaries of the subproject,
you should first merge the subnets before configuring the communication
connections between the S7 stations.
If you do not merge the subnets, NetPro assumes that you are connecting the
subnets via routers and displays warning messages to this effect.
Notice
Preserving Consistency in Merged Subnets
After merging the subnets, you should check the consistency throughout the multi-
project using the menu command Network > Check Interproject Consistency in
NetPro to make sure that there is consistency throughout the multiproject. This
check detects, for example, S7 subnet IDs that are not unique within the multipro-
ject.
Procedure
The parameters that describe the properties of the PROFIBUS subnet generally
have default values. Using the procedure described below, you can check the
settings and adapt them to your situation.
1. Select the network object in NetPro and select the menu option Edit "Object
Properties.
Result: The “General” tab is opened in the “Properties PROFIBUS” dialog.
2. Enter a suitable subnet name in the “General” tab and if required any further
information to describe the subnet.
3. Check the entries in the “Network Settings” tab.
Settings
The values in the dialog box are used as basic values for the subsequent
calculation of the bus parameters.
You can see the results of this calculation in the next dialog box. After entering or
checking the values, simply click the “Bus Parameters” button.
Parameter Meaning
Highest PROFIBUS This specifies the highest PROFIBUS address of an active station on the
Address (HSA) bus system. Passive stations can have addresses higher than the highest
station address (possible values: highest active address in the network ...
126).
Transmission Rate Transmission rate on the bus. (Values depending on profile, see below:
9.6 Kbps, 19.2 Kbps, 45.45 (31.25) Kbps, 93.75 Kbps, 187.5 Kbps, 500
Kbps, 1.5 Mbps, 3 Mbps, 6 Mbps, 12 Mbps).
For the permitted transmission rates, please refer to the information in the
relevant manual /2/ for your particular CP.
Profile Here you can decide on the method (algorithm) used to calculate the
fundamental bus parameters for PROFIBUS operation.
Various algorithms are available that have been optimized for the particular
mode of the subnet. These algorithms result in stable network operation.
DP
You can operate a homogeneous DP network with a maximum of one
DP master class 1 and no further DP masters (an additional PG is
possible). This algorithm must be used exclusively for the DP protocol.
Standard
This is for the multiprotocol and multimaster mode with fast stations. The
stations in this case are equipped with newer ASICs such as ASPC2,
SPC2 etc. This includes all SIMATIC S7 PROFIBUS CPs.
Universal (default setting)
This is for CPs that cannot be operated in the DP or standard categories.
User-defined
In this case, you yourself define the bus parameters.
Notice
If you are operating subnets to which SIMATIC S5 components are attached by
means of the CP 5430/5431, please use the universal profile.
Caution
! Only trained specialists should use the user-defined algorithm.
Procedure
By inserting the PROFIBUS CP in the rack of a SIMATIC station and assigning it to
the station, you establish the logical attachment between the CP and subnet.
1. Place the station in your project that you want to attach to PROFIBUS using the
PROFIBUS CP.
2. Select the CP in the hardware configuration just like any other module by
selecting it in the hardware catalog and then selecting the slot in the rack.
You select CPs in the hardware catalog using a short text and the order
number.
Result: The CP is assigned to the SIMATIC station.
For information about the permitted slots, refer to /2/.
How to configure a module is described in detail in /9/.
Subnet Attachment
To allow you to activate the network attachment of the PROFIBUS CP, the
SIMATIC Manager displays the following dialog:
Note
You can open the dialog for setting the interface at any time from the Properties
dialog of the CP in the “General” tab.
3. If you have not yet created a subnet in the project or have not yet created the
selected subnet, you can now create a subnet. To do this, select the “New”
button.
Result: An object of the type network is created in the project.
Now follow the steps as outlined in Section 3.3.2.
4. Check the PROFIBUS address and if necessary change it. The system first
enters the next free PROFIBUS address automatically as the PROFIBUS
address.
Further options for program−controlled address setting in Section 3.4.1
5. Select the required subnet type in the “Subnet” list box.
6. You can display the properties dialog box for the selected subnet by clicking the
Properties button. For more detailed information about the PROFIBUS network
properties dialog, refer to Section 3.3.2.
7. Enter information specific to the subnet node in the “General” tab.
8. You must finally confirm your input with OK, otherwise the networking is not
entered (refer to Point 6)
Result: The CP is now configured as a network node for the corresponding S7
station.
Procedure
You can easily get an overview of the network attachment configurations of a
SIMATIC station in one of the following ways:
A graphic overview in NetPro;
An overview in table form in the Properties dialog of the station
In the displayed dialog, you can see the subnet attachments that were configured
for the SIMATIC station.
You can select what is displayed using the check box under “Display interfaces by
type”.
Overview
In addition to the network attachment, you can also make further settings for the
specific module or you can call functions.
1. Select the PROFIBUS CP in the hardware configuration.
2. Select Edit Object Properties. In the dialog, you will see further tabs in
addition to the “General” tab described in Section 3.3.3 depending on the type
and CP, some of which are shown in the example of a CP 342-5:
Please read the description of the Properties dialog of the CP in the integrated
F1 help. The functions are explained in detail there.
Addresses Tab
The “Addresses” tab displays the address at which the module can be addressed
by the user program. You require this address when calling the FCs for DP and for
FDL connections.
−> See /6/
Notice
Please note the following information on S7−300 stations:
If you selected the option ”Update OB1 process image cyclically” in the CPU confi-
guration, (default), make sure that the start address of the PROFIBUS CP is out-
side the process image area (start addresses in the ”Addresses” tab).
Example: if the process image selected for the CPU = 1024 (0...1023), an address
>= 1024 must be selected for the PROFIBUS CP.
Note
When selecting the mode, please make sure you follow the instructions
−> in Section 4.6 Checking or Setting the CP Mode DP Master
−> in Section 6.3.2 Checking or Setting the CP Mode DP Slave
Refer to the CP Product Information for the protocols supported by the CP!
Note
PG functions and test functions are always possible on the MPI regardless if the
selected mode.
In the “passive” mode, no PG functions are possible via PROFIBUS.
Options Tab
Depending on the CP type, the following settings can be made:
Diagnostics Tab
In the “Diagnostics” tab, you can start NCM S7 PROFIBUS diagnostics.
−> see Chapter 8 Diagnostics for a description
Overview
Communication connections can be configured fully when the communications
partners are available in the current project. For the stations on the PROFIBUS
subnet, whose configuration data were not created in STEP 7 or whose
configuration data are not managed in the currently active project, the following
substitute objects can be created in the project:
SIMATIC S5 stations
PG/PC
Other stations
− for devices of other manufacturers
− for SIMATIC S7 stations in another project (not necessary in a multiproject)
Note
Instead of creating substitute objects, you can also configure unspecified
connections for connections to the stations listed above.
In the Properties dialog of these connections, you must then specify the full
partner address. These partners do not appear in the NetPro plant view.
Plant Plant
“Production 1” “Production 2”
S7-400/1 PC/PG
S7-300/1 S7 − 300/3
Non-SIMATIC
PROFIBUS subnet 1
S7-300/2
S7-400/5
SIMATIC
S5
Procedure
To enter a substitute in the project, following the steps below:
1. Select the project in the SIMATIC Manager.
2. Select the station type with the menu option Insert "Station "...
Result: An object of the type “Other Station” or “SIMATIC S5” is created in the
project.
Notice
The PROFIBUS address configured here and the bus parameters must actually be
set on the relevant station! Use the appropriate software tool (for example COM
5431).
5. Select the subnet to which you want to attach the station and confirm with OK.
Result: The CP is assigned to the first subnet displayed in the subnet table. If
you have created more than one subnet, you can select the required subnet
here.
6. You can display the properties dialog box for the selected subnet by clicking the
Properties button. For more detailed information about the PROFIBUS
properties dialog, refer to Section 3.3.2.
7. Enter information specific to the subnet node in the “General” tab.
Result: You have created a network node and attached the station to the subnet.
All the SIMATIC stations in the project can establish communication relationships
to this station.
The station is now also included in the calculation of the bus parameters.
Modifications
If you want to change the address or any other settings for the SIMATIC S5 or
other station, select the node name again in the node list and click the “Properties”
button.
Multiple Assignment
The station can also be assigned to more than one subnet node providing there
are enough possible attachments. To do this, repeat the procedure for attaching
“Other Stations” to the subnet.
Setting Up Connections
You must set up connections for the connection-oriented services supported by the
PROFIBUS CP, see also Table in Section 1.2.
S7 connections
see the STEP 7 user manual /9/;
FDL connections
see Chapter 7;
FMS connections
see Volume 2 of this manual
The procedure described in the STEP 7 User Manual /9/ in the Section
”Configuring Connections” also applies to the additional connection types possible
with the CP.
Principle
The configuration data of the PROFIBUS CP are downloaded from the hardware
configuration. All the configuration data of the S7 station are downloaded including
the central configuration, all relevant DP master systems and all the selected
parameters.
The data of the configured connections must also be downloaded, see below.
Type of Interface
You can download the configuration data to the S7 station on the following paths
(interfaces):
MPI Interface
You always use this interface when you download the configuration data for the
first time (node initialization).
During the so-called “Node Initialization”, you supply the PROFIBUS CP with a
PROFIBUS address and with bus parameters for the first time. You have then
configured the CP so that further configuration is possible working on the PG
connected to the PROFIBUS. You download the configuration data either via
MPI or via a different CP that already has an address.
PROFIBUS
Here, you use the PG mode of the PROFIBUS CP in the S7 station (see also
Section 1.3). The node must previously have been initialized via the MPI
interface (see above).
Procedure
To download the configuration data to the S7 station, follow the steps outlined
below:
1. Open the ”Set PG/PC Interface” dialog box, for example, using the Start menu
SIMATIC STEP 7
2. Set the PG/PC interface according to the CPs available on your PG and
according to the bus attachment (interface parameter assignment used). Make
sure that you set consistent bus parameters.
For more detailed information, refer to the integrated help system.
3. Select the menu command PLC " Download to Module.
STEP 7 then guides you through dialog boxes.
Refer to the other information available in Help Contents... in STEP 7 or in the
STEP 7 manual, in the section ”Configuring and Assigning Parameters to Modules”
in /9/.
Notice
If you have assigned a new PROFIBUS address to the PROFIBUS CP and have
also configured connections (S7, FDL, or FMS connections), you must always
download the connection configuration again.
Remember that you also make suitable address adaptations for the other stations
or “substitute objects”.
Note
If you drag the CP to a different slot, the data of the connection configuration are
automatically updated. The data of the connection configuration must, however, be
downloaded again!
3.4.1 Changing the Mode and PROFIBUS Address with the User
Program
STL Explanation
REQ :=M10.0 // Trigger bit for the job
IOID :=B#16#54 // Module base address of the PROFIBUS CP is in the
// input area (PI)
LADDR :=W#16#100 // Module base address of the PROFIBUS CP
RECNUM :=B#16#3 // Select data record 3
RECORD :=P#DB45.DBX 0.0 BYTE 3 // Data area for data record 3 − data in DB 45
RET_VAL :=MW12 // Return value of block in memory word 12
BUSY :=M10.1 // SFC returns code: job active (1),
// Job done (0)
Table 3-6 DB 45
Notice
The module can then only be operated in the DP master mode if it was
configured in the hardware configuration as DP master.
If an invalid mode (>3) or an invalid PROFIBUS address (> HSA) is specified,
no change is made. SFC 58 does not, however, signal an error to the user
program.
Caution
The change is retained until power off/on on the station or until it is
reconfigured using data record 3.
After power off/on, the CP returns to the configured mode and PROFIBUS
address (default).
4.1 Overview
4.2 Procedure
Steps
Programming and configuring the DP master system involves the following steps:
Configuring Programming
Configuring
Configuration allows the DP slaves to be installed regardless of the program. Two
steps are necessary, as follows:
− Configuring the DP master system
You specify the DP master and corresponding DP slave in the configuration
table.
− Assigning parameters to the DP master system
Programming
You program the following in the user program of the CPU, for example with
Ladder Logic or Statement List:
1. Access to the process data. This involves the following:
− The evaluation of a DP input signal (analog or binary signal) in the specified
DP input area.
− Setting or deleting a binary output signal or the value of an analog signal in
the specified DP output area.
2. The DP communication in the program execution on the CPU. This involves the
following:
− The process data transfer or acceptance within the CPU cycle using FCs
(DP_SEND or DP_RECV).
− The querying and evaluation of diagnostic information using an FC
(DP_DIAG).
− Controlling the distributed peripheral I/Os using control jobs, for example
with synchronization instructions using an FC (DP_CTRL).
How you use the functions (FCs) in your user program for the DP master mode is
described in the following sections of this chapter. The exact syntax of the FCs and
the meaning of the block parameters is described in /6/.
Bus Parameters
The transmission rate, the PROFIBUS address and the mode (DP master, DP
slave active, DP slave passive, no DP mode, see Section 4.6) can be selected
when configuring with STEP 7.
The CP adopts these settings after the configured data have been downloaded.
The PROFIBUS address and the mode (DP master, DP slave active, DP slave
passive, no DP mode, see Section 4.6) can be set as follows:
By configuring;
The CP adopts this setting after the configured data have been downloaded.
This variant is described for setting the mode in this chapter. This is the
standard situation for a fixed setting.
Using a job in the user program;
For an example, refer to Section 3.4
Using a DP master (class 2) job.
For more detailed information, refer to Section 4.6.
Functions
For the data exchange using the STEP 7 user program, two FCs are available:
DP_SEND
This FC transfers the data of a specified DP data area on the CPU to the send
buffer of the PROFIBUS CP for transmission to the DP slaves.
DP_RECV
This FC takes the data read from the DP slaves from the receive buffer of the
PROFIBUS CP and enters it in the specified DP data area of the CPU.
DP Master DP Slaves
CPU PROFIBUS CP
STEP 7 CP
user program database
DP DP DP
data areas data buffer data areas
DP_RECV receive
Figure 4-2 Interaction of the CPU and PROFIBUS CP in the DP Master Mode
Note
The data (received data) in the DP data buffer of the PROFIBUS CP are updated
regardless of whether or not the user program in the CPU has fetched data from
the DP data buffer (receive buffer). This means that data can be overwritten.
Overview
Communication between the DP master and DP slaves can be divided into four
modes:
OFFLINE
STOP
CLEAR
RUN
Each of these modes is characterized by defined actions between the DP master
and the DP slaves.
Concept
The distributed I/Os connected via PROFIBUS behave like local process signal
I/Os in terms of the user program. This means that no special access mechanisms
are necessary for the DP data area.
Bit memory
DP input area
Process
image DP
output area
Figure 4-3 Assignment of the DP Process Image to the PLC Data Areas
Examples
Depending on the location of the DP input / DP output area, the control program
also uses operations such as those shown below when accessing DP:
A I 2.0
to read data in the process image (PII)
AN M 4.5
to read a memory bit.
Note
The DP input area and DP output area are both transferred into or from one of
these data areas on the CPU in their entirety.
0
2 Specify the DP data area in the FC call
4
6 RECV := P#I10.0 BYTE 44;
Address offset
8
10 0
12 2
. DP data area .
. .
50 40 Example − access to byte 40 in the DP data
52 43 area (IB 10 + 40= IB 50):
54
. L IB 50
.
Figure 4-4 Specifying the DP Data Area as an Address Offset with the PROFIBUS CP
Procedure
Basically, you configure a DP master system in exactly the same way as a
centrally installed SIMATIC S7 station.
The chapter “Configuring a PROFIBUS DP Network” in the STEP 7 manual /9/
describes the following procedure:
Steps
The steps marked in gray differ from the procedure described in /9/ and are
explained below.
Note
When configuring the DP master system with the CP 342-5 as DP master in the
SIMATIC S7-300, note the CP type (order number) in the hardware catalog when
selecting DP slaves. For more detailed information, refer to the following section.
Note
Please note any differences as explained in the product information bulletin /
manual of the CP type your are using!
Configuration Table
The following figure shows an example of a configuration after configuring in the
“Master System Configuration Table” with the detailed view of a selected slave.
Figure 4-5 “Master System Configuration Table” with Detailed View of a DP Slave
Note
Please note any differences as explained in the product information bulletin /
manual /2/ of the CP type your are using!
Note
Remember that the input and output addresses shown in the configuration table
are address offsets, in other words addresses relative to the DP data areas
specified in the FC call (see also Figure 4-4).
Procedure
To assign parameters for a DP master system, follow the procedure described in
the “STEP 7 Manual” /9/ in the chapter “Configuring the Distributed I/O (DP)”.
The steps marked in gray differ from the procedure described in /9/ and are
explained below in greater detail.
Overview
When you create a DP master system by entering the PROFIBUS CP in the
configuration table as described in Section 4.4 and in /9/, the CP is configured
automatically for the DP master mode.
Figure 4-6 Example of the Properties Dialog for a PROFIBUS CP with the DP Master Function
You will see that the DP master mode is already activated in the properties dialog.
Note
If you change the mode from DP master to DP slave and confirm the change, the
DP master configuration is deleted!
Other Possibilities
There are other ways of setting or changing the mode
Using a job in the user program of local CPU;
Using the job in the user program, you can adapt both the CP mode and the
PROFIBUS address dynamically to the situation in your plant.
For an example, refer to Section 3.4.1
Table 4-3 Parameters for the “DP Reaction Time” Dialog Box
Note
It is important to remember that if you are using a mixed mode, the token rotation
time (TTR) plays an important role in the calculation of the DP reaction time. If the
actual token rotation time is much shorter than the configured TTR, the actual
reaction time is very much shorter.
Functions
To activate DP in the control program, there are four functions (FCs) available, as
follows:
DP_SEND
This block transfers the data of a specified DP output area to the PROFIBUS
CP for output to the distributed I/Os.
DP_RECV
This block receives the processed data of the distributed I/Os and status
information in a specified DP input area.
DP_CTRL
This block executes control functions for the distributed I/Os.
DP_DIAG
This block queries diagnostic data on the DP master and DP slaves.
Initializing a DP Master
The DP master must be initialized with an initial block call. You can either use the
first call of FC DP−SEND or FC DP−RECV.
At the first call, the response is as follows depending on the FC used:
DP−SEND
If DP−SEND is used for initialization, the data area transferred is not adopted
and the output value ”0” is sent to the DP slaves.
The next DP−SEND call sends the transferred user data.
DP−RECV
If DP−RECV is used for initialization, the received data is not adopted.
The next DP−RECV call returns the received user data.
A typical sequence for the end of the initialization is outlined below.
CPU Cycle
One possible sequence in which the DP functions (FCs) can be used in
conjunction with organization and program blocks in the CPU cycle is shown
below.
The example illustrates a situation in which process data are read in at the
beginning of the CPU cycle and the output data generated after the user programs
have been run are output to the process I/Os.
A separate diagnostic program is included for monitoring the DP slaves.
One of the user programs also sends a control job, for example a synchronization
job for output data. This synchronization job could, for example, apply to the group
of slaves whose process variables are processed by this user program.
Read PII
OB Read DP
DP_RECV input
Diagnostic
program
DP_DIAG Read diag.
data
User
program 1
DP_CTRL Control job
I/O access
User
program 2
I/O access
DP_SEND Write DP
output
Write PIQ
Examples
Examples of calls and a detailed explanation of the call parameters for the FCs can
be found in the following:
in the programming manual /6/;
and the NCM S7 “Primer” /5/.
DP Modes
The following modes of the DP master are described in greater detail in
Section 4.3.2:
OFFLINE
STOP *)
CLEAR
RUN
*) Note: With newer modules (refer to the information in the manual), the STOP
mode is now the OFFLINE mode.
Changing DP Modes
The mode of the DP master can be changed as follows:
By system events or user intervention:
− Switch setting on the PROFIBUS CP or CPU or using the PG functions
− Other disturbances (for example problems on the bus)
By a DP Start/Stop control job in the user program.
CPU CLEAR RUN − sends process values to all slaves with process
Stop−>Run (default mode) output
CP RUN, OFFLINE − stops cyclic updating and releases the DP slaves for
Run−>Stop (default mode) other DP masters.
Resulting Mode
The resulting mode is the default mode shown in the table. Depending on the
system status and on the defaults selected with DP_CTRL, other modes are
possible (for the priority of the modes refer to Section 4.3.2).
PROFIBUS
ÂÂÂÂÂ
Configured DP
ÂÂÂÂÂ
Activate /
subsystem with
activated and
deactivated DP slaves
ÂÂÂÂÂ
deactivate
ÂÂÂÂÂ
DP Slave
Figure 4-8 Example of a DP Master System with Activated and Deactivated DP Slaves
Using FC DP-CTRL
You activate or deactivate a DP slave by triggering a DP-CTRL job once (CTYPE 9
and 10; see /6/).
Tip:
For more information on this topic, refer to the samples and explanations on the
SIMATIC NET CD-ROM “Quick Start”.
Note
The user program interface for DP diagnostics described here is only available
for the SIMATIC S7 DP master with PROFIBUS CP.
Diagnostic Functions
The DP diagnostic functions allow you to determine the following aspects:
Which of the connected DP slave stations is not responding on PROFIBUS?
Which of the connected DP slave stations has diagnostic data available?
Which problems are affecting specific stations?
In addition to these functions, there are further functions that depend on the
diagnostic path and diagnostic tool such as status queries started by the user
program.
Application
The functions are designed so that the different diagnostic strategies can be
combined and tailored to your needs. It is also possible to use the individual
functions completely separately from each other.
Overview
By including diagnostic functions in the user program, you can achieve continuous
monitoring of the DP slaves and their modules.
Diagnostic Sequence
The following diagram illustrates the decisions you can make when implementing
diagnostic functions.
Single
diagnostics
(FC DP_DIAG)
Read PII
Read DP input
OB DP_RECV
Read status byte
Diagnostic
processing
DP_DIAG Read DP station list
User
programs
Write DP output
DP_SEND
Write PIQ
Figure 5-2 Typical Sequence of DP Function Block Calls in the CPU Cycle with Diagnostic Processing
7 6 5 4 3 2 1 0
0
Table 5-1 Meaning of the DPSTATUS Bits Relevant for Diagnostics (extract from Table 5-1
in /6/)
Bit Meaning
2 0: no new diagnostic data exist
1: evaluation of DP diagnostic list useful; at least one station has new
diagnostic data
1 0: all DP slaves in the data transfer phase
1: evaluation of the DP station list useful
Byte 0 1 2−14 15
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
Status
bit
Station 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 120 127
address*)
*) The bit for the station address 127 is irrelevant since the permitted range for DP slave addresses on the
PROFIBUS bus is between 0 and 126.
Overview
DP single diagnostics is generally triggered depending on the result of the
diagnostic list evaluation. It is, however, possible to start a single diagnostic job
regardless of other statuses.
Purpose
The DP diagnostic list provides information about the DP slaves with changed
diagnostic data. The diagnostic data themselves must be fetched with the single
diagnostics function.
The diagnostic list is kept on the PROFIBUS CP and constantly updated in the DP
polling cycle. The updating is achieved by high-priority messages from the DP
slaves as soon as the diagnostic information has changed on one of the slaves.
Entries can also be made by the DP master.
After the user program has read out the diagnostic list once, the diagnostic list is
disabled. The diagnostic list can only be enabled again when at least one new
entry exists. Reading single diagnostics is possible at any time.
Byte 0 1 2−14 15
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
Diagnostic
bit
Station 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 120 127
address*
*) The bit for the station address 127 is irrelevant since the permitted range for DP slave addresses on the
PROFIBUS bus is between 0 and 126.
Initialization Phase
During the initialization phase of the master (parameter assignment, configuration),
the diagnostic messages in the diagnostic list are ignored (the diagnostic bits are
initialized with 0). If an error occurs during the initialization phase of a DP slave,
the diagnostic bit of this station is set to 1.
User program
The DP_DIAG function is used to read out the DP station list. The necessary
parameters are explained in the description of the block. DP_DIAG is described in
/6/.
The DP diagnostic list can only be read out when there are new diagnostic data for
at least one station.
Response
Note the following response during execution and on the interface to your user
program:
The status “Evaluation of DP diagnostic list useful” in DPSTATUS is reset by
reading the diagnostic list.
The station−related bits in the diagnostic list stored on the CP are reset after
reading out the relevant single diagnostics information.
Note
If the single diagnostics information is read before the diagnostic list is evaluated,
neither the bits in DPSTATUS nor the bits in the diagnostic list will be reset!
Application Program
The DP_DIAG function is used to read out the DP single diagnostic data. The
necessary parameters are explained in the description of the block. DP_DIAG is
described in /6/.
3rd byte Station status byte 3 PROFIBUS address of DP master that assigned
parameters to the DP slave (FFH = no parameters
4th byte Master address
yet; FEH = not yet obtained on PROFIBUS)
5th byte (high byte) Ident_number
6th byte (low byte) Vendor ID dependent on slave type
Note
The total length of the data record is 4 bytes shorter than the length in the DP
standard. Instead of the maximum possible 244 bytes, only 240 bytes are
permitted for operation with the PROFIBUS CP in a SIMATIC S7-300.
Table 5-4 Structure of the Station Status Bytes − Station Status Byte 1
Table 5-4 Structure of the Station Status Bytes − Station Status Byte 1
Table 5-5 Structure of the Station Status Bytes − Station Status Byte 2
6 Reserved −
5 SyncMode The DP slave is in the SYNC mode
4 FreezeMode The DP slave is in the FREEZE mode
Table 5-5 Structure of the Station Status Bytes − Station Status Byte 2
Table 5-6 Structure of the Station Status Bytes − Station Status Byte 3
6.1 Procedure
Steps
The following steps are necessary to allow you to operate a DP master system
with a SIMATIC S7 PLC acting as the DP slave:
Configuring Programming
Configure the PROFIBUS CP as a DP slave for Write the user program for the SIMATIC S7 DP
data exchange using PROFIBUS DP. Slave and download the program to the
See Section 6.3 SIMATIC S7 CPU. See Section 6.4
Commissioning
Configuring
The PROFIBUS CP must be supplied the following as a PROFIBUS node:
A PROFIBUS address
Bus parameters
This information is configured and downloaded to the PROFIBUS CP.
Configuring the bus parameters is described in Chapter 3.
Programming
By programming, you specify the sequence of the user program and access to the
I/O data. The following must be programmed on the CPU:
1. Writing or reading process data in the DP data buffer.
2. The DP communication in the CPU program. Here, you use the FCs
(DP_SEND or DP_RECV).
How you use the functions (FCs) for the DP slave mode in your user program is
described in the following sections of this chapter. The exact syntax of the FCs and
the meaning of the block parameters is described in /6/.
Note
If you are familiar with the functions of the PROFIBUS CP/DP slaves, you can skip
the next section and continue at Section 6.3.
Characteristics
The following features characterize the way in which the PROFIBUS CP transfers
data in the DP slave mode.
The PROFIBUS-DP interface of the PROFIBUS CP operates in compliance
with PROFIBUS DP, EN 50170 Vol. 2.
The DP slave mode allows process data that were preprocessed in the user
program of the DP slave to be transferred to the DP master. In the other
direction it allows data to be received from the DP master, further processed in
the user program of the DP slave and output to the process.
The PROFIBUS CP operating as a DP slave cannot be activated as a DP
master at the same time.
Area of Consistency
The area of consistency is always the entire input and output data area of the DP
slave. This applies regardless of whether the DP master addresses the DP slave
as a compact or modular device.
Note
Please note any differences as explained in the documentation /2/ of the CP type
your are using!
DP Slave DP Master
CPU PROFIBUS CP
STEP7 CP
user program database
DP DP DP
data areas data buffer data areas
Outputs PROFIBUS
DP_RECV receive
DP_SEND send
Inputs
Figure 6-1 Interaction between the CPU and PROFIBUS CP in the DP Slave Mode
Functions (FCs)
For the data exchange using the STEP 7 user program, two FCs are available:
DP_RECV
This function takes the DP data transferred by the DP master from the receive
buffer of the PROFIBUS CP and enters them in a specified DP data area on the
CPU.
DP_SEND
This function transfers the data of a specified DP data area on the CPU to the
send buffer of the PROFIBUS CP for transmission to the DP master.
Area of Consistency
The entire DP input or output data area of the DP slave is included and
consistency during transmission is guaranteed. Here, it does not matter whether
the DP master addresses the DP data area in its entirety or divided into modules.
Note
Please note any differences as explained in the documentation of the CP type
your are using!
Note
The DP data area for input and output data is always transferred as the entire
area to or from the data areas on the CPU.
The following diagram illustrates the mapping of the DP data buffer of the
PROFIBUS CP on the alternative data areas in the CPU.
data block
Bit memory
DP buffer for
Process input data
image
DP buffer
for output data
Figure 6-2 Assignment of the DP Process Image to the CPU Data Areas
Initialization
Initializing the DP slave mode involves the following:
Parameter assignment
The parameter assignment specifies how the DP slave operates.
Configuration
The configuration specifies the structure of the DP slave.
Parameter Assignment
The DP slave is assigned parameters by the DP master by configuring the bus
parameters and by the parameter assignment frame.
Configuration
As DP slave, the PROFIBUS CP requires the following information for the
configuration:
Length of the input data
Length of the output data
The DP slave is configured using the FC calls on the user program interface on the
CPU. The DP slave checks whether the total length contained in the configuration
frame of the DP master is identical to the lengths specified in the FCs. If the
lengths specified for input/output data are not identical, the slave does not change
to the data transfer phase.
Note
Remember that successful parameter assignment and configuration by the DP
master is only possible after local initialization by the DP_RECV FC call for the
output data and the DP_SEND FC call for the input data.
Note
Check the entries in the diagnostic buffer of the DP slave.
Watchdog
If the watchdog expires, the DP slave assumes that communication with the DP
master has broken down. If no frame is received from the DP master during the
watchdog time, the PROFIBUS CP reacts by resetting and starting up again.
Diagnostic Data
The PROFIBUS CP as DP slave prepares diagnostic data (6 bytes) for the DP
master.
Meaning
Using a global control frame, the DP master can send global commands to the DP
slave.
The following are defined:
CLEAR
Control command to change the data output to a safe, defined state.
SYNC 1)
Control command for synchronizing data output.
FREEZE 1)
Control command to freeze data input.
CLEAR
The DP master can reset the outputs in the DP slave using the global control job
CLEAR.
The sequence in the DP slave is as follows:
The CLEAR command causes the DP master to set the outputs in the DP data
buffer area to 0 continuously. Data inputs continue to be read. The next time
DP_RECV is run through on the DP slave, the reset DP output byte is transferred
to the DP data area of the CPU. The user program receives a message in the
status byte of the FC.
To find out whether the PROFIBUS CP supports the global control frames SYNC
and FREEZE, please refer to the CP documentation /2/.
Procedure
Enter the PROFIBUS CP of the DP slave in the hardware configuration and assign
the CP to the subnet as described in Chapter 3.
The rest of the procedure depends on the type of device and the configuration of
the DP master, as follows:
The DP master is a SIMATIC S7 station configured in the same project as the
DP slave
The DP master is any other type of device
optional step
mandatory step
Requirements
The procedure of assigning S7 stations with PROFIBUS CPs as intelligent DP
slaves to a DP master system, as described here, assumes the following:
The DP master is a SIMATIC S7 station that was configured in the same project
as the DP slave.
The PROFIBUS CP of the DP slave has been entered in the hardware
configuration and networked. This means that when the DP master system is
then configured, the PROFIBUS CP is configured automatically for the DP
slave mode.
3. Select the DP slave in question and confirm your selection with OK.
Result:
With this selection, the PROFIBUS CP of the DP slave is automatically
configured for the “DP Slave” mode.
4. As the next step, select one or more universal modules from the hardware
catalog and position it/them in the configuration table. This configures the data
areas of the DP slaves.
5. You must now specify the module or modules in terms of its data types
(input/output) data length and address assignment. You can enter values
directly in the table or select the module and open the object properties.
The following figure shows the “Master System Configuration Table” (detailed view)
with one SIMATIC S7 PLC with a PROFIBUS CP as the DP slave. The standard
module was configured with two universal modules; the DP master is a SIMATIC
S7-300 station.
Note
PG functions and test functions via MPI are always possible regardless of the
selected mode.
PG functions and test functions via PROFIBUS are always possible regardless of
the selected mode (exception: DP slave passive).
Procedure
Follow the steps outlined below to check or modify the setting:
1. Select the PROFIBUS CP in the configuration table.
2. Select Edit Object Properties. The following dialog is displayed:
Cancel Help
Figure 6-3 Example of the Properties Dialog for a PROFIBUS CP with the DP Slave Function
3. If the mode is not already set as a result of the automatic detection function,
click the DP Slave field.
4. If required, select the option “The module is a passive node on PROFIBUS”
− DP slave active (Default)
The PROFIBUS CP is an active node, in other words it can be used for
further communication services such as FDL connections, PG functions or
S7 Functions (passive).
− DP slave passive
The PROFIBUS CP operates exclusively as a DP slave. PG functions and
other protocols using PROFIBUS are not possible.
Using a job in the user program of the local CPU;
Using the job in the user program, the PROFIBUS address can be adapted
dynamically to the situation in your plant.
This could, for example, be used in redundant systems, one station taking over
the tasks of another, failed station. The PROFIBUS address of the redundant
station is then changed to the address of the previously active station.
For an example, refer to Section 3.4.1
Purpose of the FC
The FC call has the following effects:
The first time the block is called, the slave configuration is activated.
The DP data area is transferred to the PROFIBUS CP (DP_SEND) or received
from the PROFIBUS CP (DP_RECV).
The execution of the job is confirmed either positively or negatively in a status
message.
Note
The data area information (SEND parameter for DP_SEND and RECV parameter
for DP_RECV) must match the lengths configured on the DP master and
transferred as a configuration frame.
Structure of DPSTATUS
You can see the structure and meaning of the bits in DPSTATUS in /6/.
Read PII
OB User programs
Read received
DP_RECV data of the DP
master
Evaluate codes of DP-RECV
Write PIQ
Result:
The DP slave is ready to be configured and have parameters assigned by the DP
master.
7.1 Procedure
Steps
The following steps are necessary to operate FDL connections in the SIMATIC S7
with the PROFIBUS CP:
Configuring Programming
Create new FDL Configure any “other Program the FDL interface in
connections. stations“ for FDL the user program.
connections with the
appropriate (refer to the information in
configuration tool. Section 7.9.1 and the
detailed description in /6/).
Configure FDL
connection properties.
necessary steps
optional steps
PROFIBUS CP
S7 − 400 PROFIBUS CP S7 − 300 PROFIBUS CP S7 − 400 PROFIBUS CP
Subnet 1
Subnet 2
PROFIBUS CP
Organization in a Multiproject
If interproject subnets are configured, you can also configure connections over
such subnets using STEP 7 V5.2. The endpoints of these connections can be
located in different projects.
Application
Data transmission on a configured FDL connection is suitable for the transmission
of related blocks of data between two or more PROFIBUS stations.
The following must be distinguished:
Specified FDL connection
The communications nodes are specified uniquely by configuring connections.
The connection partner can be within or outside the STEP 7 project.
Unspecified FDL connection (free layer 2 access)
The address of the connection partner is not specified during configuration. The
communications nodes are identified by address information in the
communication job of the user program. This means that up to 126 nodes can
be reached via one configured unspecified FDL connection providing they
support FDL connections.
The connection partner can be within or outside the STEP 7 project.
FDL connection with broadcast
All the nodes ready to receive broadcast messages can be reached on
PROFIBUS.
FDL connection with multicast
All the nodes belonging to the multicast group can be reached on PROFIBUS.
Notice
If you want to use FDL connections, the CP mode of the PROFIBUS CP must not
be set to DP slave passive!
All stations outside the project must be configured with substitute objects (for
example “S5” or “other station”).
Characteristics
A specified FDL connection allows program-controlled communication between two
stations on PROFIBUS with the following characteristics:
The data transfer is bi-directional, in other words, it is possible to transmit and
receive on the FDL connection simultaneously.
Both stations have the same rights, in other words, each station can trigger the
send and receive procedures in response to events.
Sending and receiving data uses the SDA service (SendDataAcknowledge)
complying with EN 50170, Vol 2.
receive send
PROFIBUS
node
User data
area
send receive
FDL connection
receive send
Figure 7-3 Sending and Receiving on One Specified FDL Connection − Configured Destination Address
Amounts of Data
Refer to the product information accompanying the PROFIBUS CP for the number
of FDL connections supported by the PROFIBUS CP /2/. The number of
connections per station can be increased by adding more CPs.
The maximum amount of data that can be sent or received by the PROFIBUS CP
on a specified FDL connection is as follows:
240 bytes sending
240 bytes receiving
Characteristics
An unspecified FDL connection with open layer 2 access allows program-controlled
addressing of the communication partner and communication between nodes on
PROFIBUS has the following characteristics:
The data transfer is bi-directional, in other words, it is possible to transmit and
receive on the FDL connection simultaneously.
The local node is specified in the configuration. The remote node is entered in
the job header of the job buffer by the user program when it calls AG_SEND.
This means that every node on the PROFIBUS (PROFIBUS addresses 0 to
126) can be reached.
The PB address, the LSAP and the service of the sender can be read from the
job header of AG_RECV.
User data
Figure 7-4 Sending and Receiving via an unspecified FDL Connection − Programmed Addressing
Amounts of Data
For the number of FDL connections supported by the particular PROFIBUS CP,
please refer to the product information shipped with the PROFIBUS CP /2/. The
number of connections per station can be increased by adding more CPs.
Up to 236 bytes of user data can be transferred per job buffer. The job header
occupies an additional 4 bytes.
Characteristics
A broadcast connection allows a message to be sent to more than one receiver
with one job. This means that messages can be received on a broadcast
connection that are also received by other nodes on PROFIBUS at the same time.
The characteristics can be summarized as follows:
Data transfer is bi-directional, in other words it is possible to send and receive
at the same time on the broadcast connection.
Data is sent and received using the FDL service SDN (Send Data with No
Acknowledge).
When sending, a job buffer must be specified with the AG_SEND call. The area
for the job header must be reserved; the content is, however, not relevant.
The PB address, the LSAP and the service of the broadcast sender can be
read from the job header of AG_RECV.
When sending, the LSAP range from 1 to 56 is used. For receiving, LSAP 63 is
reserved for all broadcast nodes.
SIMATIC S7 station
with PROFIBUS CP
User data area
Job buffer send LSAP = 1..56
Figure 7-5 Sending and Receiving via an FDL Connection with Programmed Broadcast Addressing
Amounts of Data
The PROFIBUS CP supports one broadcast connection.
Up to 236 bytes of user data can be transferred per job buffer. The job header
occupies an additional 4 bytes.
Notice
If you use an FDL connection with broadcast, you cannot receive messages on
any further broadcast connection on this CP, including FMS connections with
broadcast.
Reason:
The receive LSAP for broadcast (63) is occupied by the broadcast connection.
Characteristics
An FDL connection with multicast allows the sending of a message to several
receivers belonging to a multicast group with one job.
The characteristics can be summarized as follows:
Data transfer is bi-directional, in other words it is possible to send and receive
at the same time on the FDL connection with multicast.
Data is sent and received using the FDL service SDN (Send Data with No
Acknowledge).
A uniform LSAP is used to send to the multicast group (range 1 to 56).
When sending, a job buffer must be specified with the AG_SEND call. The area
for the job header must be reserved; the content is, however, not relevant.
The PB address, the LSAP and the service of the multicast sender can be read
from the job header of AG_RECV.
SIMATIC S7 station
with PROFIBUS CP
User data area
Job buffer send FDL connection
with multicast
Job header
LSAPlocal=LSAPremote (1..56)
Job header
User data
receive
User data
Multicast
group
Figure 7-6 Sending and Receiving via an FDL Connection with Programmed Multicast Addressing
Amounts of Data
For the number of FDL connections supported by the particular PROFIBUS CP,
please refer to the product information shipped with the PROFIBUS CP /2/. The
number of connections per station can be increased by adding more CPs.
Up to 236 bytes of user data can be transferred per job buffer. The job header
occupies an additional 4 bytes.
Connections
When you create new connections, you start from entered and networked stations.
A connection is then configured starting from a station in the current S7 project and
then selecting a second station.
Due to the networking, the PROFIBUS address of the local station is already
decided. On a specified FDL connection, this also applies to the selected
destination station. The local and remote LSAPs (Link Service Access Point) at
both ends of the connection are automatically assigned default values.
The endpoint of the connection to a SIMATIC S7 station is always a CPU. A
separate connection table is created for each CPU and displays the connection
partner and types of connections.
New Connection
To configure a new connection, the stations and their CPs must be configured and
networked in the S7 project. To create a new connection, follow the steps below
starting in NetPro:
1. In NetPro, select the CPU in the station from which you want to establish the
connection.
2. Select the menu command Insert New Connections (also available with the
right mouse button!).
Result: The following dialog appears on the screen.
3. Select the partner station to which you want to establish a connection (if several
CPUs exist, please select the required CPU).
4. Select the connection type you want to use (for example FDL connection) in the
“Type” box
If you confirm your entries with Add, the new connection is created and the ”New
Connection” remains open. This allows you to create further connections without
needing to reopen the dialog box. At the same time, the connection list is updated.
When you click OK, the connection is entered in the list, the dialog is terminated
and the display in the main dialog is updated.
If you click Cancel, the dialog is terminated and the connection is not entered in
the list.
Notice
The number of connections possible per PROFIBUS CP can be found in the
product information /2/supplied with the CP. If several CPs are installed in one
station, the next CP is automatically selected if the limit is exceeded. You can
rearrange connections in the properties dialog.
Connections to “Other Stations” are generated as “incompletely specified
connections”, in other words the remote LSAP is empty. These connections must
be checked in the properties dialog and acknowledged with “OK”. To specify the
connection, the remote LSAP must be entered.
Introduction
As well as the entry in the connection table, you can also modify special properties
for each configured connection.
Here, you can change specific connection parameters that were entered as
defaults during the new connection dialog.
Tabs
The properties dialog takes the form of tabs containing groups of different types of
parameter.
The following tabs are available for FDL connections:
General
Displays the global parameters of the connection and the local name of the FDL
connection.
Addresses
Displays the local and remote address information.
Overview
This is an overview of all the configured FDL connections of the selected S7
station with their parameters (local and remote LSAPs).
Status Information
This tab displays the current status information for the connection (valid at the
time the dialog is opened). This information corresponds to that displayed by
NCM diagnostics.
General Tab
This tab in the properties dialog displays global parameters for the connection and
the local connection name of the FDL connection. The local ID is identical to the ID
in the connection list and is shown here to illustrate the assignment.
Table 7-1
Local Endpoint
Attributes Description
Local ID Identical to the value from the connection list
Name Proposed name that can be changed by the user
Via CP If the station contains more than one CP of the same type connected to the same
subnet, you can select the connection route. −> “Route” button.
If no CP is assigned (for example because the CP was previously deleted) “none” is
displayed here.
If there is only one CP plugged into the station, no selection is possible.
Local Endpoint
Block Parameters
ID This value must be entered as a block call parameter ID in the user program to
identify the connection.
LADDR This decimal value must be entered as a block call parameter LADDR in the user
program to identify the CP (display in hexadecimal, 200H −> 512D).
If you have configured load distribution at the local or remote end on two or more
PROFIBUS CPs, you can assign the connection to the required route via the CPs.
Figure 7-7 Correlation between the Information in the “Addresses” Tab and the Endpoints of the FDL Connection
Notice
If you use an FDL connection with broadcast, you cannot use any other broadcast
connection, not even an FMS connection with broadcast.
Caution
Please note the following information about activating cyclic distribution of the bus
parameters:
If you have activated this option in the ”Properties PROFIBUS” dialog in the
”Network Settings” tab, the bus parameters are sent cyclically during operation as
broadcast frames. To avoid conflicts handling frames in the user program that
receives the broadcast frames, you must either:
ignore all frames sent with an LSAP >56 or
or
deactivate the function in the ”Network Settings” tab.
Overview Tab
The overview tab displays all the previously configured FDL connections and their
parameters for this station (this is only for information and cannot be modified).
You can set the column width in the table individually.
Parameter Description
Local ID This is the connection ID of the FDL connection
Name (loc. endpoint) Entered connection name. This identifies the FDL connection.
CPU / Applications If you display all the FDL connections being operated in this station in the
multiprocessor mode (with PC stations: multiple applications), the
CPU/application that is the endpoint of the particular connection is specified
here.
R/S or via CP With S7-CPs: Rack/slot of the local CP via which the connection is
established.
With PC stations: Display of the CP over which the connection is
maintained.
Remote Specifies the remote PROFIBUS address of the partner.
address
Local LSAP Local link service access point.
Remote LSAP Remote link service access point.
Status The status displays the current configuration status of the connection.
“Connections without assignment” are indicated by “No local CP/No remote
CP” in the status column and a “!” character at the end of the“Local ID” (for
example: 0002 A000!).
Connections to “Other Stations” are generated as “incompletely specified
connections”, in other words the remote LSAP is empty. The user must
check these connections in the properties dialog. If you exit the properties
dialog with “OK”, the changes are entered and the identifier of the local ID (!)
and the status “Incomplete” are acknowledged.
Toolbar
In the toolbar of the connection configuration dialog the following functions are
available:
Save To save the configured connection, select the Save function or click the save
button (diskette icon).
Print You can print the entire connection table or individual sections of it by selecting
the Print function or clicking the print button (printer icon).
The following print options are available:
Overview of all connections (complete connection table)
Overview of the selected connections (selected area)
Detailed printout of all connections (details of all connections)
Detailed printout of the selected connections (details of the selected area)
Change Connection You assign a new partner station to the selected connection.
Partners Important!
Remember that this also changes the partner ID on connections of the
SEND/RECEIVE interface.
Download You download the connection table to the PLC. For more detailed information
call up the integrated help function.
Help If you require help or more information, select the Help function or click the
help button (? icon).
The help button provides you with context-sensitive help. Using the help
function you call a help dialog familiar from other Windows applications.
Overview
This section explains the actions that can lead to a configured connection losing its
assignment to the CP or being deleted.
Notice
Remember that in contrast to the S7 homogeneous connections, the connections
of the SEND/RECEIVE interface are assigned a CP-dependent ID. The actions
below may require the ID to be modified so that the interface information in the
user program must also be adapted.
Table 7-3 Actions That Can Cause Changes to Configured Connections, continued
Display
The status of the connection is displayed in the “Properties FDL Connection” dialog
in the “Overview” tab.
Vorsicht
If a CP is replaced by a different CP, this must provide at least the same services
and must be at least the same version.
Functions (FCs)
The following two blocks (FCs) are available for handling communication on FDL
connections:
AG_SEND
This block takes the user data from the specified user data area and transfers it
to the PROFIBUS CP.
AG_RECV
This block transfers received user data to the user data area specified in the
call.
The diagram below illustrates the situation. Using the FCs AG_SEND and
AG_RECV, the user program instructs the PROFIBUS CP to send or receive data
on the configured FDL connection.
With the connection types unspecified with free layer 2 access, broadcast and
multicast, the job buffer includes a further job header in the user data area for
address and service parameters.
CPU PROFIBUS CP
CP
STEP 7 database
user program
FDL
data buffer
User data
areas
AG_SEND send
FDL connection
AG_RECV receive
Figure 7-8 Interaction of the CPU and PROFIBUS CP when Using FDL Connections
Notice
The blocks can be called more than once in a cycle for one communication
connection.
AG_RECV
FDL connection
ÇÇÇÇÇÇÇÇ
ÇÇÇÇÇÇÇÇ
ÇÇÇÇÇÇÇÇ ÇÇÇÇÇÇÇÇ
AG_RECV
ÇÇÇÇÇÇÇÇ
ÇÇÇÇÇÇÇÇ FDL connection
ÇÇÇÇÇÇÇÇ
ÇÇÇÇÇÇÇÇ
AG_SEND
ÍÍÍÍÍÍÍÍ ÍÍÍÍÍÍÍÍ
ÍÍÍÍÍÍÍÍ
AG_RECV
ÍÍÍÍÍÍÍÍ ÍÍÍÍÍÍÍÍ
ÍÍÍÍÍÍÍÍ ÍÍÍÍÍÍÍÍ
AG_SEND
ÇÇÇÇÇÇÇÇ
data of the FDL
connection
ÇÇÇÇÇÇÇÇAG_SEND
Write PIQ
Legend:
ÍÍ
ÇÇ
ÍÍ
ÇÇ
Sequence of the CPU cycle
The different shading shows which FDL connections
and FC blocks belong together.
Figure 7-9 Typical Sequence of FDL Function Calls in the CPU Cycle
Principle
The PROFIBUS CP processes the send and receive jobs independent of the CPU
cycle and requires one FDL transmission time. The interface to the user program
with the FCs is synchronized by an acknowledgment. Two situations must be
distinguished:
The CPU cycle is faster than the transmission time.
The CPU cycle is slower than the transmission time.
Note
Please refer to the sequence charts for the FCs in /6/. These charts show how to
handle the SEND/RECEIVE interface in the user program for problem-free data
exchange.
Remember the points below about the CPU cycle and transmission time.
Notice
Remember that resource shortages can occur if the processing speeds on the
sender and receiver are not the same (sender faster than receiver).
If this occurs, the sender receives a message from the FCs and must repeat the
send job at a later time. (“No resources on the destination station” see /6/).
8.1 Overview
Functions
The diagnostic functions can be grouped as follows:
General diagnostic and statistical functions
Type and mode-dependent diagnostic functions
Mode-Dependent Functions
Depending on the configured mode of the PROFIBUS CP, the following diagnostic
functions are possible:
DP master diagnostics:
Querying the status of the DP master and the communication status of all
configured slaves
It is possible to call DP slave diagnostic data for specific DP slaves.
DP slave diagnostics
Note
Note that NCM S7 Diagnostics is not possible for a passive DP slave via
PROFIBUS.
Installation
Die NCM S7 Diagnostics is an integrated part of STEP 7.
There are several ways in which you can start the diagnostic tool, for example:
From the standard START menu of Windows with the SIMATIC program
group.
Select this option if the STEP 7 project in which the CP was configured is not
available on your PC/PG (service situation).
From the properties dialog of the relevant CP from your STEP 7 project.
From the standard Start menu of From the Properties dialog of the CP within
Windows (program group your STEP 7 project.
SIMATIC"..."NCM).
Use this method if the STEP 7 project
in which the CP was configured is not
available on your PG (for service
purposes).
Structure
In the same way, for example, as the SIMATIC Manager, NCM S7 Diagnostics
appears as a separate two-part application window with a menu and toolbar:
In the navigation area on the left-hand side, you will find the hierarchically
arranged diagnostic objects.
You have an overview of the available diagnostic functions at all times. The
object structure displayed in the navigation area is adapted to the type of CP
you are currently checking and the functions and connections configured for the
CP.
In the content area, on the right-hand side, you will see the result of the
diagnostic function you selected in the navigation area.
Operation
By selecting a diagnostic object in the navigation area with the mouse, you
execute the diagnostic function.
Using the menu bar and toolbar, you control the sequence of the diagnostics
with context-sensitive menu commands.
Overview
When running diagnostic functions, the following menu commands have general
significance. Depending on the context, other functions may be available; for more
detailed information refer to the online help for NCM Diagnostics.
Menu Meaning
Diagnostics" With this menu command, you can establish a connection to a different CP
Open Online Connection... you want to check without having to quit and restart the diagnostic tool. The
Diagnostics" current diagnostic connection is closed.
Close Online Connection... If you want to use more than one diagnostic connection at the same time,
you can start NCM S7 diagnostics more than once.
Operating Mode" You can control the CP as follows:
Stop CP Stops the CP.
Start CP Starts the CP if the RUN/STOP switch is set to RUN.
Reset CP With certain CP types, for example the CP 443-5 Basic, you can reset the
CP memory. This function must be confirmed before it is executed.
View"Update Each time you activate this menu command, the displayed diagnostic and
status information is updated once.
View" Using this menu command, you activate and deactivate the automatic
Update Cyclically (cyclic) updating of the displayed diagnostic and status information.
You can set the interval between update points with the menu command
Options Customize.
Options"Customize With this menu command, you set the general parameters for the diagnostic
session.
Help" You display a help topic relating to the current diagnostic function As an
alternative, you can also press the F1 key.
Remember that you can also call up context-related help for some of the
diagnostic functions. To obtain help, position the cursor on the output field
and press the F1 key.
Note
If the connection to the CP is terminated during the diagnostic session, the
following message is displayed: “The online connection was terminated”.
You can reestablish the connection to the CP with the corresponding
acknowledgment in the dialog. The connection is then automatically reestablished
whenever possible.
Initial Situation
Establish the physical connection between the PG and the SIMATIC S7 Station.
There are two ways of doing this:
MPI
Industrial Ethernet (ISO protocol)
Industrial Ethernet TCP/IP (IP protocol)
PROFIBUS
If the project data are available on your PG/PC, follow the steps outlined below:
1. Select the S7 station in the project and open the hardware configuration (HW
Config).
2. Select the CP and open the Properties dialog.
3. Select the “Diagnostics” dialog.
4. Select the “Run” button.
Result:
NCM S7 Diagnostics is opened. The path is set automatically to match the current
connection in STEP 7.
If there are no configuration data on your PG/PC, follow the steps outlined below to
start diagnostics with a connected CP:
1. Open the Windows Start menu and select the command SIMATIC STEP 7
NCM S7 Diagnostics
NCM S7 Diagnostics is started with the message “No online connection to the
CP” in the contents area.
2. Select the menu command Diagnostics Open Online Connection...
3. In the displayed dialog “NCM S7 Diagnostics: Online Path”, select the interface
to match your hardware configuration.
Depending on the type of network attachment you have, you will be prompted
to specify an address:
Table 8-2 Possible Settings for the Online Paths − without Parameters for Internetworking
Attachment of target
station: Industrial Ethernet
Attachment of target
station: Industrial Ethernet Network 2
PG/PC S7 − 300
CP C C S7 − 300
U P P CP C
U P
Node address:
PROFIBUS address 9
Attachment of gateway:
Industrial Ethernet
Attachment of target
station :
MPI/PROFIBUS/AUTO
S7 subnet ID of target network:
0001 0001
Figure 8-3 Example of the Parameter Settings for the Online Path with one Gateway
Attachment of gateway:
Industrial Ethernet S7 − 300
CP C
Routing over other U P
gateways is done
Node address:
automatically !
PROFIBUS address 9
Attachment of target
station: MPI/PROFIBUS/AUTO
Figure 8-4 Example of the Parameter Settings for the Online Path with Several Gateways
There is a special situation when you use your PC/PG as a PC station and have
therefore set the interface to PC internal (local) in “Setting the PG/PC Interface”.
You must them set parameter values for the gateway, even when you do not need
to go through any other gateway to reach the target station.
Select the following settings:
Gateway attachment: MPI/PROFIBUS/AUTO
Node address (gateway)
Enter the index of the module here.
The index is the virtual slot address of the component (can be displayed using
the Station Configuration Editor). The index is identical to the slot number
selected during configuration of the PC station in STEP 7 HW Config!
S7 subnet ID of destination network:
Follow the same steps as described for setting the gateway.
Tip:
You do not need to make these settings for the gateway if you select one of the
following options:
Start NCM Diagnostics from the Properties dialog of the CP.
When setting up your module, do not select the interface as PC internal (local)
in “Set PG/PC Interface”.
Attachment of target
Gateway attachment: station : MPI/PROFIBUS/AUTO
MPI/PROFIBUS/AUTO
Note
To operate several diagnostic connections at the same time, you can start NCM
S7 Diagnostics more than once.
You can also start NCM S7 Diagnostics twice with an online connection to the
same CP; this can, for example, be useful if you want to monitor the diagnostic
buffer at the same time as running diagnostic functions on a connection.
Requirement: You have an online connection available via the LAN (ISO or
TCP/IP) on the one hand and an online connection via the communication (K) bus
on the other (alternatively via the CPU or via PG channel routing via a further CP).
Procedure
To use diagnostics efficiently, particularly when working with the diagnostic tool for
the first time, the following procedure can be recommended.
1. Use the sequence shown below as a basis for using diagnostics:
if the CP is not in the ring If the CP is not If the CP is in the RUN mode
(with active in the RUN mode
PROFIBUS nodes)
View / evaluate the diagnostic buffer to obtain an overview and detailed explanation of
diagnostic events.
2. Locate the problem, for example, based on the checklist in Section 8.6 the
diagnostic function you require based on the recommendation in the list.
Diagnostic buffer General Error Diagnostics Using Event messages are recorded on the CP
Diagnostic Buffers: in a ring buffer. The ring buffer can
To display and decode event messages contain up to 50 entries.
recorded on the CP in detail. The In NCM S7, on the other hand, up to 500
diagnostic buffer provides you with messages can be saved!
detailed information about all the All the CP functions can generate event
communication services of the CP. messages. When you call the diagnostic
object, the messages are read out and
displayed. The latest message is
displayed in the top line with the highest
consecutive number.
If you double-click a previously selected
event message, you display a help text
explaining the message in greater detail.
Select the “DP The DP slave diagnostics function is The DP slave is displayed as follows
Slave Adr. xx” used to display DP slave diagnostic depending on the CP mode:
diagnostic object: data. Depending on the operating mode In the DP slave mode: As a separate
of the addressed PROFIBUS CP, this diagnostic object at the first hierarchy
involves the following: level.
In the DP master mode, diagnostic In the DP master mode: As a nested
data of the attached DP slaves. diagnostic object of the DP master.
In the DP slave mode, diagnostic
data of the local PROFIBUS CP.
Regardless of the mode, the DP
master belonging to the DP slave
provides additional diagnostic
information that can be used for
more detailed diagnostics.
Module Query the module states: Module diagnostics can only be called
Diagnostics. To decode the module error statuses in when a module of the DP slave has
detail. failed! If there is no module diagnostics,
the entry in the navigation area is shown
in light gray.
Meaning
The following lists contain several typical problems and their possible causes and
how you can use the NCM S7 diagnostics tool to remedy the situation.
The checklists deal with the following topics:
1. Checklist for General CP Functions
2. Checklist for DP Master Mode
3. Checklist for DP Slave Mode
4. Checklist for FDL Connections
You will find a similar checklist for FMS connections in Volume 2 of this manual.
Note
In the column “Identifying the Cause and Remedy”, you will see the diagnostic
function recommended for dealing with the problem shown in bold face.
Table 8-6 Checklist for Typical Problems when Operating a DP Master in a System
Table 8-6 Checklist for Typical Problems when Operating a DP Master in a System
Table 8-6 Checklist for Typical Problems when Operating a DP Master in a System
9.1 Application
Firmware
Here, firmware means the system programs in the SIMATIC NET modules.
Installation
The firmware loader is available when you have installed STEP 7 on your PG/PC.
Load Files
The firmware loader supports the following file types:
<file>.FWL
A file form that that in addition to the actual firmware contains extra information
that is displayed by the firmware loader. Based on this information, the firmware
loader can check that the firmware is compatible with the device.
For detailed information, read the documentation, for example, the README file
shipped with the load file.
This information is displayed even after reading in the FWL file into the firmware
loader.
Loadable Firmware
The PROFIBUS CP supports updating of the firmware by the firmware loader. To
allow this, the CP remains in the ”waiting for firmware update” state for 10 seconds
following power up when you keep the mode selector held on STOP at the same
time.
Following a firmware update, the rack must be turned off and on again before
normal operation is possible!
Select the Next button and follow the instructions displayed in the dialog.
Caution
! Make sure that the load file you are using is intended as an update for the version
of the firmware contained on your module. If you are in any doubt, contact your
local Siemens advisor.
Caution
! Remember that interrupting the download can lead to an inconsistent state on the
module!
Read the description of the relevant device in Part B of this manual
Further information
For more detailed information on the various load options, refer to the
integrated help.
You will find special features of loading described in the relevant device manual
/3/
A Pinout
Notice
You will find the valid approvals on the type plate of the relevant product.
Product description:
CP 342-5 Order no.: 6GK7 342−5DA03−0XE0
CP 342-5 FO Order no.: 6GK7 342-5DF00-0XE0
CP 343-5 Order no.: 6GK7 343−5FA01−0XE0
CP 443−5 Basic Order no.: 6GK7 443−5FX02−0XE0
CP 443−5 Extended Order no.: 6GK7 443−5FDX04−0XE0
Note
You can find the current valid certificates and approvals on the type plate of the
respective product.
IEC 61131–2
The SIMATIC NET S7−CPs mentioned above fulfill the requirements and criteria of
IEC 61131–2 (programmable logic controllers, Part 2: equipment requirements and
tests).
CE Mark of Conformity
The SIMATIC NET S7−CPs mentioned above meet the requirements and
protection objectives of the following EC directives and comply with the
harmonized European Standards (EN) for programmable logic controllers
published in the Official Gazettes of the European Community:
89/336/EEC “Electromagnetic Compatibility“ (EMC Directive)
94/9/EG „Equipment and protective systems intended for use in potentially
explosive atmospheres“ (Guidelines for Explosion Protection)
EMC Directive
The SIMATIC NET S7−CPs mentioned above are designed for use in industrial
areas.
Warning
! Requirements for the cabinet/enclosure
When used in hazardous environments corresponding to Class I, Division 2 or
Class I, Zone 2, the device must be installed in a cabinet or a suitable enclosure.
To comply with EU Directive 94/9 (ATEX95), this enclosure must meet the
requirements of at least IP54 in compliance with EN 60529.
Warning
! Suitable cables for temperatures in excess of 70
C
If the cable or conduit entry point exceeds 70
C or the branching point of
conductors exceeds 80
C, special precautions must be taken.
If the equipment is operated in an air ambient in excess of 50
C, only use cables
with admitted maximum operating temperature of at least 80
C.
Warning
! Protection against transient voltage surges
Provisions shall be made to prevent the rated voltage from being exceeded by
transient voltage surges of more than 40%. This criterion is fulfilled, if supplies are
derived from SELV (Safety Extra−Low Voltage) only.
Notice
When using (installing) SIMATIC NET products in hazardous area zone 2, make
absolutely sure that the associated conditions are adhered to!
You will find these conditions here:
In the SIMATIC NET Manual Collection under
All Documents > “Approval of SIMATIC/SIMATIC NET Products for Direct
Installation in Ex−Zone 2”
You will find details of the SIMATIC products here:
On the Internet at the address
http://support.automation.siemens.com/WW/view/en/13702947
Machinery Directive
The product continues to be a component according to article 4(2) of the EC
Machinery Directive 89/392/EEC.
In accordance with the Machinery Directive, we are obliged to indicate that the
described product is intended exclusively for installation in a machine. Before the
finished product is commissioned, it is important to ensure that it conforms with the
Directive 89/392EEC.
Warning
! Personal injury and material damage may be incurred.
The installation of expansions, which are not approved for SIMATIC S7−CPs or
their target systems, can violate the requirements and regulations for safety and
electromagnetic compatability.
Only use expansions that are approved for the system.
AVIS CANADIEN
Cet appareil numérique de la classe A est conforme à la norme NMB−003 du
Canada.
Note
You can find which of the following UL/CSA or cULus approvals was accorded to
your product from the inscriptions on the type plate.
UL Recognition
UL−Recognition−Mark Underwriters Laboratories (UL) in accordance with UL 508:
Report E 85972
CSA Certification
CSA−Certification−Mark Canadian Standard Association (CSA) in accordance with
C 22.2 No. 142:
Certification Record 063533–C−000
Note
The system must be installed in accordance with the specifications of the NEC
(National Electrical Code).
If you use the SIMATIC NET S7−CPs in environments that correspond to Class I,
Division 2 (see above), they must be installed in a housing that corresponds at
least to IP54 in accordance with EN 60529.
FM Approval
Factory Mutual Approval Standard Class Number 3611,
Class I, Division 2, Group A, B, C, D, T3...T6 or
Class I, Zone 2, Group IIC, T3...T6.
Refer to the type plate on the module for the temperature class.
Warning
! Personal injury and material damage may be incurred.
In potentially explosive atmospheres personal injury and material damage may be
incurred if an electrical circuit is connected or disconnected during operation of a
SIMATIC NET S7−CP (e.g. in the case of plug connections, fuses, switches).
Do not connect or disconnect live current circuits, unless it is certain that danger of
explosion has been excluded.
WARNING − EXPLOSION HAZARD: DO NOT DISCONNECT EQUIPMENT
WHEN A FLAMMABLE OR COMBUSTIBLE ATMOSPHERE IS PRESENT.
If you use SIMATIC NET S7−CPs under FM conditions, they must be installed in a
housing that corresponds at least to IP54 in accordance with EN 60529.
Warning
! Risk of explosion when connecting or disconnecting the device
EXPLOSION HAZARD
DO NOT CONNECT OR DISCONNECT EQUIPMENT WHEN A FLAMMABLE
OR COMBUSTIBLE ATMOSPHERE IS PRESENT
Enter the ID of the relevant manual as a search key. The ID is shown below the
literature name in brackets.
Manuals that are installed with the online documentation of the STEP 7 installation
on your PG/PC, can be selected from the Start menu (Start > SIMATIC >
Documentation).
You fill find an overview of the SIMATIC documentation at:
http://support.automation.siemens.com/WW/view/en/10805878
http://support.automation.siemens.com/WW/view/en/8859629
and
SIMATIC S7
Automation system S7−400, M7−400
− Installation (ID: 1117849)
− Module data: reference manual (ID: 1117740)
Siemens AG
http://support.automation.siemens.com/WW/view/en/1117849
http://support.automation.siemens.com/WW/view/en/1117740
CP 343−5:
http://support.automation.siemens.com/WW/view/en/8778841
CP 443−5 Basic:
http://support.automation.siemens.com/WW/view/en/8776422
CP 443−5 Extended:
http://support.automation.siemens.com/WW/view/en/8777196
/20/ SIMATIC
PROFINET System Description
System manual
Siemens AG
(part of the manual collection)
/21/ SIMATIC
From PROFIBUS DP to PROFINET IO
Programming manual
Siemens AG
(part of the manual collection)
Order Numbers
The order numbers for the SIEMENS documentation listed above can be found in the catalogs
“SIMATIC NET Industrial Communication, Catalog IK PI” and “SIMATIC Programmable Controllers
SIMATIC S7 / M7 / C7”.
You can obtain these catalogs, further information you require and offers for courses from your local
SIEMENS office or national head office.
Note
This is the last release before the two manuals “NCM S7 for PROFIBUS” and
“Device Manual S7-CPs for PROFIBUS” were merged into this manual.
This version of the manual includes information relating to new functions in STEP 7
and NCM S7 as of V5.2.
In the main, this involves the following topics:
S7 communication over routers (single-ended client and server functionality) via
an IE/PB Link or CP (see Section 1.4)
Multiprojects
With the new multiproject functionality, projects can be split up and distributed
for engineering and then merged again.
H
Hardware configuration, A−64 O
HSA, A−62 Order numbers, A−210
Other station, A−160
I
I/O device, A−31 P
Industrial Ethernet; user interface to, A−24 Parallel Operation of SIMATIC NET CPs
ISO transport connection S7−300, A−50
printing configured connections, A−170 S7−400, A−52
save connection, A−170 PC applications, A−24