Documente Academic
Documente Profesional
Documente Cultură
Preamble
Introduction
Nowadays, the communication possibilities between automation systems
are a core demand and necessity, even in the case of systems of the lower
performance class. Due to the large variety of communication processors,
protocols and user interfaces in the SIMATIC homogenous system world
(i.e. only SIMATIC systems communicate with each other) and particularly
in the heterogeneous system world (i.e. SIMATIC systems communicate
with “third party” automation systems) this topic is extremely complex.
Basic knowledge of the principles behind protocol mechanisms, protocols
utilizable with the bus systems, as well as their properties, are just as im-
portant as the concrete implementation of a solution approach on the basis
of proven application samples.
Table 1-1
Part Title with brief description
1 Communication structures in the SIMATIC S7
This chapter gives you an overview of the structural design and the mechanisms of the
communication within the SIMATIC.
2 Bus-orientated selection aid of applicable protocols
This chapter is intended as selection aid and jump distributor in the protocol summary.
3 Description of the available protocols
This chapter comprises a collection of summaries trying to explain in a short and com-
parable form the individual protocols.
4 A glossary on term explanation
As a conclusion, the terms used in the main document are explained more detailed.
We do not accept any liability for the information contained in this docu-
ment.
Any claims against us - based on whatever legal reason - resulting from
the use of the examples, information, programs, engineering and perform-
ance data etc., described in this document shall be excluded. Such an ex-
clusion shall not apply in the case of mandatory liability, e.g. under the
German Product Liability Act (“Produkthaftungsgesetz”), in case of intent,
gross negligence, or injury of life, body or health, guarantee for the quality
which goes to the root of the contract (“wesentliche Vertragspflichten”). of a
product, fraudulent concealment of a deficiency or breach of a condition
However, claims arising from a breach of a condition which goes to the root
of the contract shall be limited to the foreseeable damage which is intrinsic
to the contract, unless caused by intent or gross negligence or based on
mandatory liability for injury of life, body or health. The above provisions do
not imply a change in the burden of proof to your detriment.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
The Configurations are not binding and do not claim to be complete regard-
ing the circuits shown, equipping and any eventuality. They do not repre-
sent customer-specific solutions. They are only intended to provide support
for typical applications. You are responsible in ensuring that the described
products are correctly used.
These Configurations do not relieve you of the responsibility in safely and
professionally using, installing, operating and servicing equipment. When
using these Configurations you recognize that Siemens cannot be made li-
able for any damage/claims beyond the liability clause described above.
We reserve the right to make changes to these Configurations at any time
without prior notice. If there are any deviations between the recommenda-
tions provided in these Configurations and other Siemens publications -
e.g. Catalogs - then the contents of the other documents has priority.
csweb@ad.siemens.de
Table of Contents
1 Communication Structures in the SIMATIC............................................. 8
1.1 Internal communication structures (paths) ................................................... 8
1.2 External communication structures (paths).................................................. 9
1.3 Bus systems............................................................................................... 10
1.3.1 Two-point connection ................................................................................. 11
1.3.2 Multipoint connection ................................................................................. 11
1.3.3 Overview of the bus systems available in SIMATIC................................... 12
1.4 Communication display in the SIMATIC family .......................................... 13
1.4.1 The S7-200 family ...................................................................................... 13
1.4.2 The S7-300/400 family ............................................................................... 15
1.4.3 WinAC-Basis/RTX...................................................................................... 17
1.4.4 WinAC-Slot................................................................................................. 18
2 Bus-oriented Selection Aid of Usable Protocols .................................. 20
2.1 MPI bus ...................................................................................................... 21
2.1.1 CPU connection external ........................................................................... 22
2.1.2 CPU connection internal ............................................................................ 26
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
2.2 PROFIBUS................................................................................................. 29
2.2.1 PB CPU – CP connection .......................................................................... 30
2.2.2 PB CP-CP connection................................................................................ 36
2.2.3 PB CPU – CPU connection........................................................................ 42
2.2.4 PC Broadcast / Multicast............................................................................ 47
2.3 Industrial Ethernet ...................................................................................... 51
2.3.1 IE CPU – CP connection............................................................................ 52
2.3.2 IE CP – CP connection .............................................................................. 56
2.3.3 IE CPU – CPU connection ......................................................................... 61
2.3.4 IE Broadcast / Multicast ............................................................................. 64
2.4 Serial Interface ........................................................................................... 67
2.4.1 PtP- connection.......................................................................................... 69
2.4.2 PtP Multicast / Broadcast ........................................................................... 73
2.5 SIMATIC backplane bus ............................................................................ 76
2.5.1 Backplane connection ................................................................................ 77
3 Protocol Description................................................................................ 81
3.1 Protocols within SIMATIC S7 ..................................................................... 82
3.1.1 Global data................................................................................................. 84
3.1.2 S7 basic communication (MPI, PB_DP)..................................................... 88
3.1.3 S7 communication (IE, PB, MPI)................................................................ 98
3.2 Industrial Ethernet .................................................................................... 110
3.2.1 ISO Transport protocol............................................................................. 112
3.2.2 TCP protocol ............................................................................................ 116
3.2.3 ISO on TCP protocol ................................................................................ 120
3.2.4 UDP Protocol ........................................................................................... 125
3.3 PROFIBUS............................................................................................... 130
Introduction
The following chapter deals with the basic principles and concepts of the
communication within the SIMATIC environment required for the data ex-
change within or between the automation devices.
Introduction
The automation system SIMATIC is based on a modular system of modules
of different functionalities.
To use this system in its modularity, a control mechanism is required via
which all parts of the system can communicate with each other.
Within the SIMATIC, this task is realized by means of a backplane bus.
Copyright © Siemens AG 2005 All rights reserved
Figure 1-1
The backplane bus system is structured as follows:
Table 1-1
Bus system Task
Communication The communication bus (also K-bus) has the task to manage the acyclic
bus (K-bus) data exchange to:
• CPs
• IP / FMs and
• Other CPUs
A bus system is available here which also allows for connections
between the stations without using the CPU.
P-bus (I/O bus) The P-bus (I/O-bus) is responsible for the data exchange between CPU
and the centralized I/O.
Here, it is possible to access data or to transfer data which are stored in
the I/O area of the CPs or IP / FMs.
Introduction
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Figure 1-2
The external communication structure can be divided as follows:
Table 1-2
Interface Description
CPU-internal CPU-internal interfaces are directly at the CPU. There
interface they are either directly connected to the associated
internal bus (e.g. MPI) or directly connected to a proc-
essor of the CPU.
A direct connection has the advantage that:
• Restrictions by the backplane bus will be avoided
• thus providing a certain performance advance.
External The external communication interfaces are usually
interfaces within the station racks or in an expansion rack as a
communication module.
Some of the communication modules can also be
used in the distributed, not intelligent units.
A connection of these modules to each other or to a
CPU is either made:
• Via the communication bus
• or the I/O bus. (Decentralized I/O is also as-
Copyright © Siemens AG 2005 All rights reserved
Introduction
The interfaces offered in the SIMATIC family are divided in their physical
types of connection into the following groups:
• Two-point connections or
• Multipoint connections.
To provide a simple distinctive possibility the main differences of both types
of connection are shown here:
Table 1-3
Two-point connection Multipoint connection
1 connection partner for each inter- n connection partner for each inter-
face face
Small distances bridgeable (approx. Larger distances bridgeable (much
10 – 1000 m) longer than 100 km)
Small protocol effort with comparable High protocol effort with comparable
data transmission security data transmission security
High deterministics High deterministics only via high
protocol effort
Figure 1-3
Peer-to-peer connections are often designed as serial connections.
In case of serial connections, standardized interfaces like RS 232, TTY
(20mA) or RS 422/RS485 are usually used. The protocols used here are,
for example, ASCII, RK512 or the 3964 R protocol.
Figure 1-4
The multipoint connection is the classic case of a bus system. Two or more
stations use the same transmission medium. For example twisted two-wire
circuits, tri-axial cables or duplex fiber-optic cables can be used as a
transmission medium.
Bus systems can be set up as
• Bus / line structures
• Tree structures
• Star structures or
• Ring structures.
In the following table some of the main properties of protocols available in SIMATIC are compared with each other.
Table 1-4
Bus system Transmission Rates Number Maximum network Redundancy ability Connection technol- Bus medium
of stations size ogy
MPI 187.5 kBit/s – 32 (126) 50 m/el. segment No (with OLM: Yes) RS 485, optical fiber Shielded TP, optical
12 MBit/s otherwise see fiber
PROFIBUS
PROFIBUS 9.6 kBit/s – 126 9.6 km elect. Yes RS 485, optical fiber Shielded TP, optical
12 MBit/s >90 km optical fiber
Industrial 10 MBit/s – Over 1000 2.5 km elect. Yes AUI, 9 pin Sub D, Tri-axial cable,
Ethernet 1 Gbit/s about 200 km optical RJ45 shielded TP, optical
fiber, WiFi
ASI-Bus 167 kBits/sec 1 Master 500 m with Repeater No ASI interface line with ASI interface line
31 / 62 Slaves and Extender penetration technique
Serial PtP 300 Bit/s – Without special driver V 24 : 10m No RS 232 C (V.24), V 24 cable, shielded
115.2 kBit/sec 2 TTY : 1.000m 20 mA (TTY), TP, TTY cable
X 27 : 1.200m RS 422/485 (X 27)
Master/Slave 300 Bit/sec – 76.8 247 V 24 : 10m No RS 232 C (V.24), V 24 cable, shielded
kBit/sec TTY up to max. 32 per RS 485 TTY : 1.000m 20 mA (TTY), TP, TTY cable
19.2 kBit/sec segment X 27 : 1.200m RS 422/485 (X 27)
Data highway 300 Bit/sec – 76.8 32 V 24 : 10m No RS 232 C (V.24), V 24 cable, shielded
kBit/sec TTY up to TTY : 1.000m 20 mA (TTY), TP, TTY cable
19.2 kBit/sec X 27 : 1.200m RS 422 (X 27)
SIMATIC 187.5 kBit/s or 10.5 Rack-dependent Rack size No SIMATIC backplane SIMATIC backplane
backplane MBit/sec bus connector bus
bus
Introduction
The following chapter shows the communication possibilities of the individ-
ual controller families. In this connection, the individual system families are
described together with their communication module families.
The following communication possibilities are available for the S7-200 fam-
ily:
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Figure 1-5
Table 1-5
Module Description
CPU interface The following three operating modes are possible with the CPU-
owned interfaces:
• As a PPI interface with PPI protocol fo
• As an MPI interface with MPI slave functions for CPU
/ CPU communication and HMI applications
• As a freely programmable, serial interface supporting
the ASCII protocol.
The desired operating mode can be set for the CPU. Up to
two interfaces can be available for each PU.
Serial interface The only serial expansion module of the S7-200 being available
(EM 241) so far is the EM241. It offers a modem interface.
The application range of this module is remote diagnostics and
the PC communication or the message transmission via SMS /
pager. The module offers the PPI protocol or a Modbus slave
support.
Industrial Ethernet inter- The Ethernet CPs 243-1 or 243-1 IT are designed for connecting
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
faces the S7-200 to the Ethernet. These allow for a direct connection of
(CP 243-1 / controllers of the S7-300 / S7-400 family as well as of PCs for
CP 243-1 IT) programming or HMI functions.
Moreover, the IT version is able to allow for direct access to the
controller via a built-in HTTP-Server functionality or FTP func-
tions. In addition, a limited E-Mail client function enables sending
messages.
ASI master interface The CP 243-2 is an AS-I master of the specification 2.1. It can be
(CP 243-2) used for connecting up to 62 AS-I slaves. A direct processing of
analog values is possible
PROFIBUS interface The expansion module EM277 is used as a valuable DP slave
(EM 277) interface for the PROFIBUS. Programming as well as S7 Server
functions can be operated simultaneously via this module.
The following communication possibilities are available for the S7-300 / S7-
400:
Figure 1-6
Copyright © Siemens AG 2005 All rights reserved
Table 1-6
20982954_SIMATIC_Comm_DOKU_v10_e
Module Description
CPU interfaces Depending on the type, the CPU offers 3 different internal inter-
faces:
• MPI interface for programming functions or for HMI functions
or for a simple connection between controllers.
• PROFIBUS DP (also MPI/DP) interface for connecting de-
central field devices, HMI systems or usable as program-
ming interface.
• Industrial Ethernet / PROFInet interface for connecting PRO-
FInet networks, suitable as programming interface or as
connection of HMI systems
Serial interface There are various different serial interfaces available for the S7-300
(e.g. CP 440, / S7-400. Available interfaces are:
CP 340 / CP 441-1, • RS 232C,
CP 341 / CP 441-2) • TTY or
• RS 422/485
These interfaces can be applied either individually or as a combina-
tion (in case of CP 441-2). For transferring user data the following
protocols are used:
• 3964 (R),
• ASCII
• RK 512 protocol
• Loadable protocol driver like Modbus or Data
Highway DF1.
Not all of the protocols are supported by modules.
Module Description
PROFIBUS interfaces The following protocols can be used with the PROFIBUS interface:
(e.g. CP 342-5 / • FDL protocol
CP 443-5 Extended, • S7 protocol
IM467, CP 343-5 / • DP protocol
CP 443-5 Basic) • FMS protocol
Here, only combinations with the DP or FMS protocol are offered by
the individual CPs. The interface module has exclusively been de-
signed for the DP protocol.
Industrial Ethernet The interfaces of the Industrial Ethernet offer the highest transmis-
(z.B. CP 343-1/ sion rate of the interfaces introduced here. They can also be used
CP 443-1, for cost-effective connections of third-party systems or old systems.
The supported protocols are:
CP 343-1 IT /
• ISO transport (restricted)
CP 443-1 IT,
• ISO on TCP (RFC 1006)
CP 444, CP 343-1 PN) • TCP
• UDP
• PROFInet
• FTP
• HTTP
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
ASI Master Via the AS-I bus it is possible to connect directly simple actuators or
(z.B. CP 343-2) sensors of specification 2.1. This version can be used for connect-
ing up to 62 AS-I slaves.
1.4.3 WinAC-Basis/RTX
Figure 1-7
Table 1-7
Module Description
MPI interfaces The MPI interface represents primarily a programming interface.
(e.g. CP 5611) Furthermore, it is designed as a dynamic data interface for the ex-
change with S7 micro-controllers as well as for the data communica-
tion to an HMI application.
PROFIBUS interfaces The PROFIBUS interface of the WinAC is used as PROFIBUS DP
(e.g. CP 5611, master or as communication interface with other S7 systems via the
CP 5613) S7 protocol. HMI function is additionally possible. There are no
other PROFIBUS standard protocols available in the system.
Industrial Ethernet inter- The Industrial Ethernet interface of the WinAC is suitable for ex-
faces changing larger data amounts with other S7 systems. It can also be
(e.g. CP 1611, used to program the controller or operate via HM systems.
CP 1613)
It is necessary to install the Simatic Net Software for using the communica-
tion services.
1.4.4 WinAC-Slot
Figure 1-8
Table 1-8
Module Description
CPU-internal The WinAC-Slot offers (CPU 412 or CPU 416) two internal inter-
interface faces in both versions:
• An MPI / DP interface and
• A DP interface
Both interfaces can be used as DP master interface. The MPI / DP
interface can be used either as MPI or DP interface for remote pro-
gramming, or for connecting to other S7 controllers or for HMI appli-
cations, without having to use another CP.
Module Description
Industrial Ethernet inter- The Industrial Ethernet interface of the WinAC is suitable for ex-
faces changing larger data amounts with other S7 systems. It can also be
(e.g. CP 1611, used to program the controller or operate via HM systems.
CP 1613)
Introduction
In the following chapter the communication protocols available for this case
are shown by means of communication constellations. In addition all possi-
ble protocols are differentiated by using defined core criteria which can be
protocol-specific or bus-specific and programming-specific.
processor
20982954_SIMATIC_Comm_DOKU_v10_e
Introduction
The following chapter shows successively all possible hardware constella-
tions enabling a data transfer via the MPI bus.
You will find a detailed bus description of the bus system discussed here in
the document “Selection criteria for networks and services”.
http://support.automation.siemens.com/WW/view/en/21045102
Table 2-2
Constellation Description
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Connection case
The task is to exchange data between two stations assigned to the same
MPI bus.
Hardware scheme
This hardware constellation is made up as follows:
Bild 2-1
Copyright © Siemens AG 2005 All rights reserved
They are built up physically separated from each other. And both stations
are coupled via the joint MPI bus. The data are to be transferred via this
connection.
Table 2-3
Station 1 S7-200 S7-300 S7-400 WinAC-Slot WinAC-Basis/RTX
(as of V 4.0)
Station 2
S7-200 X S7 basis communication S7 communication S7 communication S7 communication
(only PPI connection pos- (partner 2 as server via (partner 2 as server) (partner 2 as server)
sible) XPUT / XGET) S7 basis communication S7 basis communication
(partner 2 as server via (partner 2 as server via
XPUT / XGET) XPUT / XGET)
S7-300 X S7 basis communication S7 basis communication S7 basis communication S7 communication
global data S7 communication S7 communication
(partner 1 as client (partner 1 as client
partner 2 as server) partner 2 as server)
global data global data
S7-400 X S7 basis communication S7 basis communication S7 basis communication S7 communication
global data S7 communication S7 communication
global data global data
WinAC-Slot X S7 basis communication S7 basis communication S7 basis communication S7 communication
global data S7 communication S7 communication
global data global data
WinAC X X S7 communication S7 communication S7 communication
Basis/RTX
(ab V 4.0)
± = not applicable
Table 2-4
Protocol S7 basic communication S7 communication Global data
Service
XPUT / XGET XSEND / XRECV BSEND / BRCV USEND / URCV PUT / GET
Criterion
Data range 1 - 84 bytes 1 -76 bytes 1 – 32768 (S7-300) / 1 – 165 bytes 1 – 165 bytes 1 - 22 bytes (S7-300) /
65535 (S7-400) bytes 1 - 64 bytes (S7-400)
Consistency Only guaranteed when Yes Throughout the whole length 8 bytes throughout Yes
sending the whole length
Acknowledgement Operating system of the controller Level 7 Operating system of the controller Operating system of the
mechanism implemented controller
Connected stations 1 – 1 unidirectional 1–1 1–1 1 – 1 unidirectional 1-1 / 1-n bidirectional
bidirectional bidirectional
Configuration type Non-configured connection Bilaterally configured Unilaterally config- Bilaterally configured
ured
Connection type Dyn. / stat connection Dyn. / stat connection Stat connection Client / Client Stat. connection Stat connection Client /
Client / Server Client / Client Client / Server Client
Data connec- Small data amounts Medium to large data Small data amounts Smallest data amounts
Performance
Application samples
For this constellation, “CPU connection external via MPI”, there are several
pre-coded examples which are available in the Application Portal.
Table 2-5
Application title/ Entry-ID Description
S7 Communication via Profibus CPs with This application is an automatic test program to
BSEND / BRECEIVE and several Job Refer- exchange data between two stations on up to 4
R_Ids, respectively via an S7 connection, when
ences (R_IDs)
operated under stress i.e. continuous data ex-
Entry-ID: 20987358 change between the stations. The application can
recognize occurring mistakes and can react pur-
posively (predetermined).
Copyright © Siemens AG 2005 All rights reserved
Client server communication between WinAC This Application describes the synchronization of
20982954_SIMATIC_Comm_DOKU_v10_e
Basis and S7.200 station via S7 communication substations via a server station. When requested,
(PUT/GET) the server station transfers up to 3 different data
records to the substations.
Entry-ID: 20987586
N to 1 synchronization of data in the MPI net- This Application describes the synchronization of
work via S7 basic communication (X_SEND/ a system of four S7 300 stations. Triggered by
X_RCV) means of a digital input, three S7 station send
data via a dynamic connection to a defined mas-
Entry-ID: 19017849 ter.
Connection case
The task is to exchange data between two stations which are arranged in
the same rack and assigned to the same MPI bus.
Hardware scheme
This hardware constellation is made up as follows:
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Figure 2-2
The stations consist of two CPUs with the respective I/O modules. They are
both set up in the same rack. Both stations are additionally coupled via the
joint MPI bus, apart from the mutually used communication bus. The data
are to be transferred via the MPI bus connection.
Note
The configuration on hand is a special case. The described configuration is usu-
ally carried out via the backplane bus connection which can be used, too.
Table 2-6
Station 1 S7-200 S7-300 S7-400 WinAC-Slot WinAC-Basis/RTX
(ab V 4.0)
Station 2
S7-200 ± ± ± ± ±
S7-300 ± ± ± ± ±
S7-400 ± ± S7 basis communication ± ±
S7 communication
global data
WinAC-Slot ± ± ± ± ±
WinAC Basis/RTX ± ± ± ± ±
(ab V 4.0)
± = not applicable
Application samples
For this constellation, “CPU connection external via MPI”, there are several
pre-coded examples which are available in the Application Portal.
Table 2-8
Application title/ Entry-ID Description
N to 1 synchronization of data in the MPI net- This Application describes the synchronization of
work via S7 basic communication (X_SEND/ a system of four S7 300 stations. Triggered by
X_RCV) means of a digital input, three S7 station send
data via a dynamic connection to a defined mas-
Entry-ID: 20989875 ter.
2.2 PROFIBUS
Introduction
The following chapter shows successively all possible hardware constella-
tions enabling a data transfer via the PROFIBUS.
You will find a detailed bus description of the bus system discussed here in
the document “Selection criteria for networks and services”.
http://support.automation.siemens.com/WW/view/en/21045102
Table 2-9
Constellation Description
PB CPU – CP connection PROFIBUS communication between the central
processing unit and communication processor
PB CP – CP connection PROFIBUS communication between communica-
tion processors
PB CPU – CPU connection PROFIBUS communication between central proc-
essing units
PB Broadcast / Multicast PROFIBUS communication with multicast / broad-
cast functionality
Connection case
The task is to exchange data between two stations assigned to the same
PROFIBUS.
Hardware scheme
This hardware constellation is made up as follows:
Figure 2-3
Both stations, station 1 and station 2, consist of one CPU respectively. Sta-
tion 2 uses a communication processor for the connection to PROFIBUS.
The data are to be transferred via this PROFIBUS connection.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Table 2-10
Station 1 S7-200 S7-300 S7-400 WinAC-Slot WinAC Basis/RTX
(ab V 4.0)
Station 2
S7-200 ± S7 basis communication S7 basis communication S7 basis communication S7 communication / DP
(station 1 DP master, (station 1 DP master, (station 1 DP master, communication
station 2 DP slave) station 2 DP slave) station 2 DP slave)
DP communication S7 communication S7 communication
DP communication DP communication
S7-300 ± DP communication S7 communication / DP S7 communication / DP S7 communication / DP
communication communication communication
S7-400 ± ± S7 communication S7 communication S7 communication
WinAC-Slot ± ± S7 communication S7 communication S7 communication
WinAC Basis/RTX ± ± S7 communication S7 communication S7 communication
(ab V 4.0)
± = nicht anwendbar
Table 2-11
Protocol S7 basic communication S7 communication DP communication
Sevice
IPUT / IGET BSEND / BRCV USEND / URCV PUT / GET
Criterion
Data range 1 - 84 bytes / 1 - 94 bytes 1 – 32768 (S7-300) / 1 – 165 bytes 1 – 165 bytes 1 – 244 bytes inputs /
65535 (S7-400) bytes 1 – 244 bytes outputs
Consistency Only guaranteed when sending Throughout the whole length 8 bytes throughout the Between 122 bytes and
whole length whole length
Acknowledgement Operating system of the controller Level 7 Operating system of the controller In the PROFIBUS ASIC implemented
mechanism implemented mechanism + level 7 implementation
via the user program
Connected stations 1–1 1–1 1 – 1 unidirectional 1-1 bidirectional
bidirectional bidirectional
Configuration type Non-configured connection Bilaterally configured Unilaterally configured Bilaterally configured
Connection type Dyn. / stat connection Client / Server Stat connection Client / Client Stat. connection Client Stat. connection Client / Server
/ Server
Data connec- Small data amounts Medium to large data Small data amounts Small data amounts
Performance
Table 2-12
Protocol S7 communication DP communication
Data BSEND / BRECEIVE
Approx. 200 Approx. 95 ms Approx. 79 ms from master to slave*
bytes Approx. 39 ms from slave to master*
* The measured value for the DP protocol is based on a measurement with implemented level 7 acknowl-
edgement via the user program of 2 stations. The typical DP cycle time is 3 ms.
Application samples
For this constellation, CPU – CP connection via PROFIBUS, the following
pre-coded examples have been created which are available in the Applica-
tion Portal.
Table 2-13
Application title/ Entry-ID Description
S7 Communication via Profibus CPs with This application is an automatic test program to
BSEND / BRECEIVE and several Job Refer- exchange data between two stations on up to 4
ences (R_IDs) R_Ids, respectively via an S7 connection, when
operated under stress i.e. continuous data ex-
Entry-ID: 20987358 change between the stations. The application can
recognize occurring mistakes and can react pur-
posively (predetermined).
Routing of data records reaching over the sub- By means of a fully programmed example, this
network via a gateway CPU with S7 communi- application shows an implementation of a func-
tioning routing of data records. Via a gateway
cation (BSEND/BRECEIVE)
station, configurable data are sent from one sta-
Entry-ID: 20983154 tion to the other predefined station which is on
another network.
Client / server communication with (I) Slaves via The Application on hand offers a simple, quick
S7 basic communication (I_PUT/ I_GET) and practical learning startup into the cli-
ent/server specifications of the I_PUT/ I_GET S7
Entry-ID: 20987910 basic communication service and shows how to
deal with the configuration and user interfaces in
the SIMATIC.
Connection case
The task is to exchange data between two stations assigned to the same
PROFIBUS.
Hardware scheme
This hardware constellation is made up as follows:
Figure 2-4
Copyright © Siemens AG 2005 All rights reserved
Table 2-14
Station 1 S7-200 S7-300 S7-400 WinAC-Slot WinAC Basis/RTX
(ab V 4.0)
Station 2
S7-200 ± S7 communication S7 basis communication S7 basis communication S7 communication / DP
(Here only server or slave) (loadable PBK functions) (station 1 DP master, (station 1 DP master, communication
DP communication station 2 DP slave) station 2 DP slave)
S7 communication S7 communication
DP communication DP communication
S7-300 ± S7 communication S7 communication S7 communication / DP S7 communication / DP
(loadable PBK functions) (per client/server) communication communication
FMS communication FMS communication
FDL communication FDL communication
DP communication DP communication
S7-400 ± S7 communication S7 communication S7 communication / DP S7 communication / DP
(loadable PBK functions) (per client/server) communication communication
FMS communication FMS communication
FDL communication FDL communication
DP communication DP communication
WinAC-Slot ± S7 communication S7 communication S7 communication S7 communication
(loadable PBK functions)
WinAC ± S7 communication S7 communication S7 communication S7 communication
Basis/RTX (loadable PBK functions)
(ab V 4.0)
± = not applicable
Table 2-15
Protocol S7 basic communication S7 communication DP communication
Sevice
IPUT / IGET BSEND / BRCV USEND / URCV PUT / GET
Criterion
Data range 1 - 84 bytes / 1 - 94 bytes 1 – 32768 (S7-300) / 1 – 165 bytes 1 – 165 bytes 1 – 244 bytes inputs /
65535 (S7-400) bytes 1 – 244 bytes outputs
Consistency Only guaranteed when sending Throughout the whole length 8 bytes throughout the Between 122 bytes and
whole length whole length
Acknowledgement Operating system of the controller Level 7 Operating system of the controller In the PROFIBUS ASIC implemented
mechanism implemented mechanism + level 7 implementation
via the user program
Connected stations 1–1 1–1 1 – 1 unidirectional 1-1 bidirectional
bidirectional bidirectional
Configuration type Non-configured connection Bilaterally configured Unilaterally configured Bilaterally configured
Connection type Dyn. / stat connection Client / Server Stat connection Client / Client Stat. connection Client Stat. connection Client / Server
/ Server
Data connec- Smallest data amounts Medium to large data Small data amounts Small data amounts
Performance
tion suitable
for:
Evaluation
Configuration effort Low Medium High
Pogramming effort Medium High
Connection of Yes Yes
old systems ( S5 ) /
third party systems
*= In case of FMS, it is important to consider the usable variable description rather than the one of the usable PDU size.
By using structures, up to 76 structure elements can be packed up to a package and this package needs only a small amount of variable descriptions.
(In this connection see manual: SIMATIC NET NCM S7 for PROFIBUS / FMS)
In case of S7 and depending on the used CP, the amount of the variable description is built up as follows:
Table 2-17
Variable descriptions in the S7 S7-300 S7-400
Server variable descriptions 256 512
Partner variable descriptions 256 2640
Table 2-18
Protocol S7 communication FDL DP communication
Data BSEND / BRECEIVE Service SDA
Approx. 200 Approx. 95 ms Approx. 32 ms Approx. 79 ms from master to
slave*
bytes
Approx. 39 ms from slave to
master*
Copyright © Siemens AG 2005 All rights reserved
* The measured value for the DP protocol is based on a measurement with implemented level 7 acknowl-
20982954_SIMATIC_Comm_DOKU_v10_e
edgement via the user program of 2 stations. The typical DP cycle time is 3 ms.
Application samples
For this constellation, PROFIBUBS CP to CP connection, the following pre-
coded examples have been created which are available in the Application
Portal.
Table 2-19
Application title/ Entry-ID Description
S7 Communication via Profibus CPs with This application is an automatic test program to
BSEND / BRECEIVE and several Job Refer- exchange data between two stations on up to 4
ences (R_IDs) R_Ids, respectively via an S7 connection, when
operated under stress i.e. continuous data ex-
Entry-ID: 20987358 change between the stations. The application can
recognize occurring mistakes and can react pur-
posively (predetermined).
Data transfer via an FDL connection with SDA This application shows as to how a data transfer,
via AG_SEND / AG_RECV which can transfer any data amount up to a
maximum DB size, can be realized via a
Entry-ID: 20987711 PROFIBUS and by using the FDL protocol.
This transfer is made on acknowledged basis on
level 2 and additionally on level 7 which has been
realized within the application.
Connection case
The task is to exchange data between two stations assigned to the same
PROFIBUS.
Hardware scheme
This hardware constellation is made up as follows:
Figure 2-5
Copyright © Siemens AG 2005 All rights reserved
Both stations, station 1 and station 2, consist of one CPU respectively. The
20982954_SIMATIC_Comm_DOKU_v10_e
Table 2-20
Station 1 S7-200 S7-300 S7-400 WinAC-Slot WinAC Basis/RTX
(ab V 4.0)
Station 2
S7-200 ± S7 basis communication S7 basis communication S7 basis communication S7 communication / DP
(Here only server or slave) DP communication S7 communication S7 communication communication
(Client/Server) (DP communication
DP communication
S7-300 ± S7 basis communication S7 basis communication S7 communication / S7 communication /
DP communication DP communication DP communication DP communication
S7 communication
(Client/Server)
S7-400 ± S7 basis communication S7 basis communication S7 communication / S7 communication /
DP communication S7 communication DP communication DP communication
(DP communication
WinAC-Slot ± ± S7 communication / S7 communication S7 communication
DP communication
WinAC ± ± S7 communication S7 communication S7 communication
Basis/RTX
(ab V 4.0)
± = not applicable
Table 2-21
Protocol S7 basic communication S7 communication DP communication
Sevice
IPUT / IGET BSEND / BRCV USEND / URCV PUT / GET
Criterion
Data range 1 - 84 bytes / 1 - 94 bytes 1 – 32768 (S7-300) / 1 – 165 bytes 1 – 165 bytes 1 – 244 bytes inputs /
65535 (S7-400) bytes 1 – 244 bytes outputs
Consistency Only guaranteed when sending Throughout the whole length 8 bytes throughout the Between 122 bytes and
whole length whole length
Acknowledgement Operating system of the controller Level 7 Operating system of the controller In the PROFIBUS ASIC implemented
mechanism implemented mechanism + level 7 implementation
via the user program
Connected stations 1–1 1–1 1 – 1 unidirectional 1-1 bidirectional
bidirectional bidirectional
Configuration type Non-configured connection Bilaterally configured Unilaterally configured Bilaterally configured
Connection type Dyn. / stat connection Client / Server Stat connection Client / Client Stat. connection Client Stat. connection Client / Server
/ Server
Data connec- Smallest data amounts Medium to large data Small data amounts Small data amounts
Performance
Application samples
For this constellation, CPU – CP connection via PROFIBUS, the following
pre-coded examples have been created which are available in the Applica-
tion Portal.
Table 2-23
Application title/ Entry-ID Description
S7 Communication via Profibus CPs with This application is an automatic test program to
BSEND / BRECEIVE and several Job Refer- exchange data between two stations on up to 4
ences (R_IDs) R_Ids, respectively via an S7 connection, when
operated under stress i.e. continuous data ex-
Entry-ID: 20983154 change between the stations. The application can
recognize occurring mistakes and can react pur-
posively (predetermined).
Routing of data records reaching over the sub- By means of a fully programmed example, this
network via a gateway CPU with S7 communi- application shows an implementation of a func-
tioning routing of data records. Via a gateway
cation (BSEND/BRECEIVE)
station, configurable data are sent from one sta-
Entry-ID: 20983154 tion to the other predefined station which is on
another network.
Client / server communication with (I) Slaves via The Application on hand offers a simple, quick
S7 basic communication (I_PUT/ I_GET) and practical learning startup into the cli-
ent/server specifications of the I_PUT/ I_GET S7
Entry-ID: 20987910 basic communication service and shows how to
deal with the configuration and user interfaces in
the SIMATIC.
Client server communication between WinAC This Application describes the synchronization of
Basis and S7 200 station via S7 communication substations via a server station. When requested,
(PUT/GET) the server station transfers up to 3 different data
records to the substations.
Entry-ID: 20987586
Connection case
The task is to exchange data between any amounts of stations assigned to
the same PROFIBUS.
Hardware scheme
This hardware constellation is made up as follows:
Copyright © Siemens AG 2005 All rights reserved
Figure 2-6
20982954_SIMATIC_Comm_DOKU_v10_e
Table 2-24
Station 1 S7-200 S7-300 S7-400 WinAC-Slot WinAC Basis/RTX
(ab V 4.0)
Station 2
S7-200 ± ± ± ± ±
S7-300 ± FDL communication FDL communication ± ±
(service FDL SDN Multi or (service FDL SDN Multi or
Broadcast) Broadcast)
FMS communication FMS communication
(FMS Broadcast) (FMS Broadcast)
S7-400 ± FDL communication FDL communication ± ±
(service FDL SDN Multi or (service FDL SDN Multi or
Broadcast) Broadcast)
FMS communication FMS communication
(FMS Broadcast) (FMS Broadcast)
WinAC-Slot ± ± ± ± ±
WinAC ± ± ± ± ±
Basis/RTX
(as of V 4.0)
± = not applicable
Table 2-25
Protocol FDL FMS
Service
SDN REPORT
Criterion
Data range 1 – 236 bytes 1 – 233 bytes PDU size*
Consistency Throughout the whole length 8 bytes throughout the whole
length
Acknowledgement --- ---
mechanism
Connected stations 1 – n unidirectional 1 – n unidirectional
Configuration type Configured connection Bilaterally configured
Connection type Stat connection Client / Client Stat connection
Client / Client
Server / Client
Data connec- Small data amounts Small data amounts
Perfor-
mance
tion suitable
for:
Evaluation
Configuration effort Medium High
Pogramming effort Medium High
Connection of Yes Yes
old systems ( S5 ) /
third party systems
*= In case of FMS, it is important to consider the usable variable description rather than the one of the usable PDU size.
By using structures, up to 76 structure elements can be packed up to a package and this package needs only a small amount of variable descriptions.
(In this connection see manual: SIMATIC NET NCM S7 for PROFIBUS / FMS)
Introduction
The following chapter shows successively all possible hardware constella-
tions enabling a data transfer via the Industrial Ethernet.
You will find a detailed bus description of the bus system discussed here in
the document “Selection criteria for networks and services”.
http://support.automation.siemens.com/WW/view/en/21045102
Table 2-26
Copyright © Siemens AG 2005 All rights reserved
Constellation Description
20982954_SIMATIC_Comm_DOKU_v10_e
Connection case
The task is to exchange data between two stations connected via the
Ethernet.
Hardware scheme
This hardware constellation is made up as follows:
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Figure 2-7
Station 1 consists of a CPU which is directly connected to the Ethernet via
an Ethernet Interface. Station 2 consists of CPU with the corresponding
Ethernet communication processor. The data are to be transferred via this
connection.
Table 2-27
Station 1 S7-200 S7-300 S7-400 WinAC-Slot WinAC Basis/RTX
(ab V 4.0)
Station 2
S7-200 ± S7 communication ± ± ±
S7-300 ± S7 communication ± ± ±
S7-400 ± S7 communication ± ± ±
WinAC-Slot ± S7 communication ± ± ±
WinAC Ba- ± S7 communication ± ± ±
sis/RTX (ab V
4.0)
± = not applicable
Table 2-28
Protocol S7 communication
Service
BSEND / BRCV USEND / URCV PUT / GET
Criterion
Data range 1 – 32768 / 65535 1 – 440 bytes 1 – 400 bytes
1
bytes
Dyn. data length Yes
Consistency Throughout the whole length 8 bytes throughout
the whole length
Acknowledgement Level 7 Operating system of the controller
mechanism implemented
Connected stations 1–1 1 – 1 unidirectional
bidirectional
Configuration type Bilaterally Unilaterally config-
configured ured
Connection type Stat connection Stat. connection
Copyright © Siemens AG 2005 All rights reserved
Table 2-29
Protocol S7 communication
Data BSEND / BRECEIVE
Approx. 200 Approx. 95 ms
bytes
These measurements are based on the following general requirements:
• Baudrate 100 MBit/s, full duplex
• Crossover cabling
Application samples
For this constellation, CPU – CP connection via Industrial Ethernet, the fol-
lowing pre-coded examples have been created which are available in the
Application Portal.
Table 2-30
Application title/ Entry-ID Description
S7 Communication via Profibus CPs with This application is an automatic test program to ex-
BSEND / BRECEIVE and several Job Refer- change data between two stations on up to 4 R_Ids,
ences (R_IDs) respectively via an S7 connection, when operated
under stress i.e. continuous data exchange between
Entry-ID: 20987358 the stations. The application can recognize occurring
mistakes and can react purposively (predetermined).
Routing of data records reaching over the By means of a fully programmed example, this appli-
subnetwork via a gateway CPU with S7 cation shows an implementation of a functioning
routing of data records. Via a gateway station, con-
communication (BSEND/BRECEIVE)
figurable data are sent from one station to the other
Entry-ID: 20983154 predefined station which is on another network.
Client server communication between WinAC This Application describes the synchronization of
Basis and S7 200 station via S7 communica- substations via a server station. When requested, the
Copyright © Siemens AG 2005 All rights reserved
to the substations.
Entry-ID: 20987586
2.3.2 IE CP – CP connection
Connection case
The task is to exchange data between two stations containing an Ethernet
CP.
Hardware scheme
This hardware constellation is made up as follows:
Station1 Station2
DBWxy DBWxy
IE
Figure 2-8
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Table 2-31
Station1 S7-200 S7-300 S7-400 WinAC-Slot WinAC Basis/RTX
(as of V 4.0)
Station2
S7-200 S7 communication S7 communication S7 communication S7 communication S7 communication
(loadable PBK functions)
S7-300 S7 communication S7 communication S7 communication S7 communication S7 communication
(loadable PBK functions) ISO transport protocol
ISO transport protocol TCP protocol
TCP protocol ISO on TCP protocol
ISO on TCP protocol UDP protocol
UDP protocol
S7-400 S7 communication S7 communication S7 communication S7 communication S7 communication
(loadable PBK functions) ISO transport protocol
ISO transport protocol TCP protocol
TCP protocol ISO on TCP protocol
ISO on TCP protocol UDP protocol
UDP protocol
WinAC-Slot S7 communication S7 communication S7 communication S7 communication S7 communication
(loadable PBK functions)
WinAC S7 communication S7 communication S7 communication S7 communication S7 communication
Basis/RTX (loadable PBK functions)
(ab V 4.0)
Table 2-32
Protocol ISO Transport ISO on TCP TCP Protocol UDP Protocol S7 Communication
Service Protocol Protocol
BSEND/ USEND / URCV PUT / GET
Criterion BRCV
Data range 1 – 8192 bytes 1 – 8192 bytes 1 – 8192 bytes 1 – 2048 bytes 1 – 32768 / 65535 1 – 440 bytes 1 – 400 bytes
1
bytes
Dyn. data length Yes Yes No Yes Yes
Consistency Throughout the whole Throughout the whole Throughout the whole Throughout the whole Throughout the whole length 8 bytes throughout
length length length length the whole length
Acknowledgement Level 4 Level 4 Level 4 --- Level 7 Operating system of the controller
mechanism implemented implemented implemented implemented
Connected stations 1–1 1–1 1 – 1 bidirectional 1 – 1 unidirectional/ 1–1 1 – 1 unidirectional
bidirectional bidirectional 1 – x broadcast only bidirectional bidirectional
sending 1 – n multicast bidirec-
tional
1 – x broadcast only
sending
Configuration type Unilaterally / bilaterally Unilaterally / bilaterally Unilaterally / bilaterally Unilaterally / bilaterally Bilaterally Unilaterally config-
configured configured configured configured configured ured
Connection type Stat connection Stat connection Stat connection Stat connection Stat connection Stat. connection
Client / Client Client / Client Client / Client Client / Client Client / Client Client / Server
Data connection Small – medium Small – medium Small – medium Small data amounts Medium to large Small data amounts
Perfor-
mance
suitable for: data amounts data amounts data amounts data amounts
Evaluation
" " "
Suitable for routing No Yes Yes Yes Yes
Configuration effort Low Low Low Medium Low
Pogramming effort Medium Medium High Medium, when acknowl- Medium
edging high
2 2 2
Connection of Yes / No Yes (conditional) / Yes (conditional) / Yes Yes (conditional) / Yes No / No
old systems ( S5 ) / third Yes (conditional)
party systems
1 2
: Depending on the used controller ; : When using the CP 1430 TCP
Table 2-33
Protocol ISO on TCP protocol UDP protocol S7 communication with the
service “BSEND / BRECV“
Data
2048 bytes Approx. 90 ms Approx. 105 ms Approx. 700 ms
* The measured value for the UDP is based on a measurement with implemented level 7 acknowledgement via the user program of 2 stations.
Application samples
For this constellation, CPU – CP connection via Industrial Ethernet, the fol-
lowing pre-coded examples have been created which are available in the
Application Portal.
Table 2-34
Application title/ Entry-ID Description
S7 Communication via Profibus CPs with This application is an automatic test program to ex-
BSEND / BRECEIVE and several Job Refer- change data between two stations on up to 4 R_Ids,
ences (R_IDs) respectively via an S7 connection, when operated
under stress i.e. continuous data exchange between
Entry-ID: 20987358 the stations. The application can recognize occurring
mistakes and can react purposively (predetermined).
Comparison of data transfer via one and via This Application deals with a comparison between
four parallel ISO-on-TCP connections on the sending of a variable data record via one or four
Industrial Ethernet Ethernet connections.
Entry-ID: 20987359
Master-slave communication via Ethernet This application shows how to realize an acknowl-
with UDP using multicast and unspecified edged data transfer to a number of bus stations
connections (stations) which are variable and dynamically
Copyright © Siemens AG 2005 All rights reserved
Connection case
The task is to exchange data between two stations respectively containing
an on-board Ethernet interface.
Hardware scheme
This hardware constellation is made up as follows:
Figure 2-9
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Table 2-35
Station 1 S7-200 S7-300 S7-400 WinAC-Slot WinAC Basis/RTX
(ab V 4.0)
Station 2
S7-200 ± ± ± ± ±
S7-300 ± S7 communication ± ± ±
S7-400 ± ± ± ± ±
WinAC-Slot ± ± ± ± ±
WinAC ± ± ± ± ±
Basis/RTX (as of
V 4.0)
± = not applicable
Table 2-36
Protocol S7 communication
Service
BSEND / BRCV USEND / URCV PUT / GET
Criterion
Data range 1 – 32768 / 65535 1 – 440 bytes 1 – 400 bytes
1
bytes
Dyn. data length Yes
Consistency Throughout the whole length 8 bytes throughout
the whole length
Acknowledgement Level 7 Operating system of the controller
mechanism implemented
Connected stations 1–1 1 – 1 unidirectional
bidirectional
Configuration type Bilaterally Unilaterally config-
configured ured
Connection type Stat connection Stat. connection
Copyright © Siemens AG 2005 All rights reserved
Table 2-37
Protocol S7 communication
Data BSEND / BRECEIVE
Approx. 200 Approx. 95 ms
bytes
These measurements are based on the following general requirements:
• Baudrate 100 MBit/s, full duplex
• Crossover cabling
Connection case
The task is to exchange data between two or several stations respectively
containing an Ethernet interface.
Hardware scheme
This hardware constellation is made up as follows:
Figure 2-10
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Table 2-38
Station 1 S7-200 S7-300 S7-400 WinAC-Slot WinAC Basis/RTX
(ab V 4.0)
Station 2
S7-200 ± ± ± ± ±
S7-300 ± UDP protocol UDP protocol ± ±
(UDP multicast) (UDP multicast)
S7-400 ± UDP protocol UDP protocol ± ±
(UDP multicast) (UDP multicast)
WinAC-Slot ± ± ± ± ±
WinAC ± ± ± ± ±
Basis/RTX (as of
V 4.0)
± = not applicable
Table 2-39
Protocol UDP Protocol
Criterion
Perfor-
mance
suitable for:
20982954_SIMATIC_Comm_DOKU_v10_e
Evaluation
Suitable for routing Yes
Configuration effort Medium
Pogramming effort Medium, when acknowledg-
ing high
2
Connection of Yes (conditional) / Yes
old systems ( S5 ) / third
party systems
Table 2-40
Protocol UDP protocol
Data
2048 bytes Approx. 105 ms
* The measured value for the UDP is based on a measurement with implemented level 7
acknowledgement via the user program of 2 stations.
Application samples
For this constellation, multicast/broadcast communication via Industrial
Ethernet, the following pre-coded examples have been created which are
available in the Application Portal.
Table 2-41
Application title/ Entry-ID Description
Master-slave communication via Ethernet This application shows how to realize an acknowl-
with UDP using multicast and unspecified edged data transfer to a number of bus stations
connections (stations) which are variable and dynamically
changeable during runtime via Industrial Ethernet
Entry-ID: 20983558 and UDP without having to modify the configuration /
programming for each station. The master generates
multicast messages; the reception of these mes-
sages is acknowledged by the slaves by means of
unspecified connections.
Introduction
The following chapter shows successively all possible hardware constella-
tions enabling a data transfer via the serial interfaces.
You will find a detailed bus description of the bus system discussed here in
the document “Selection criteria for networks and services”.
http://support.automation.siemens.com/WW/view/en/21045102
Table 2-42
Constellation Description
PtP connection PtP connection between two stations
PtP multicast / broadcast PtP communication with multicast / broadcast func-
tionality
Connection case
The task is to exchange data between two stations connected via a serial
interface.
Hardware scheme
This hardware constellation is made up as follows:
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Figure 2-11
Both stations, station 1 and station 2, respectively consist of a CPU and
communication processor with serial interface. Both stations are physically
connected with each other by means of the same type of serial interface of
the respective DP via an adequate connection cable. The data are trans-
ferred via the available interface variants and the protocol driver available
for it.
Table 2-43
Station 1 S7-200 S7-300 S7-400
RS 485(RS 232), modem RS 232, TTY, RS 422/485 RS 232, TTY, RS 422/485
Station 2
S7-200 Free ASCII protocol Free ASCII protocol Free ASCII protocol
Modbus (via modem) Modbus (via modem)
S7-300 Free ASCII protocol ASCII ASCII
3964(R) 3964(R)
RK512 RK512
loadable driver (e.g.: Mod- loadable driver (e.g.:
bus, Data Highway) Modbus, Data Highway)
S7-400 Free ASCII protocol ASCII ASCII
3964(R) 3964(R)
RK512 RK512
loadable driver (e.g.: Mod- loadable driver (e.g.: Mod-
bus, Data Highway) bus, Data Highway)
Table 2-44
Protocol ASCII RK 512 3964(R) Modbus Data Highway
Criterion Master Slave
Data range 1 – 1024 bytes 1 – 1024 bytes 1 – 1024 bytes 1 – 255 bytes 4 – 1024 / 4096 bytes (300/400)
Connected stations 1 – 1bidirectional 1 – 1bidirectional 1 – 1bidirectional 1 – 1bidirectional 1 – 1bidirectional
1
S7-200 1.2 kBit/s – 38.4 kBit/s No No No Yes (via No
modem)
RS232
S7-300 300 Bit/s – 76.8 kBit/s 300 Bit/s – 76.8 kBit/s 300 Bit/s – 76.8 kBit/s 300 Bit/s – 76.8 kBit/s 300 Bit/s – 76.8 kBit/s
S7-400 300 Bit/s – 115.2 kBit/s 300 Bit/s – 115.2 kBit/s 300 Bit/s – 115.2 kBit/s 300 Bit/s – 76.8 kBit/s 300 Bit/s – 76.8 kBit/s
Bridgeable distance 15 m 15 m 15 m 15 m 15 m
S7-200 No No No No No
20mA TTY
S7-300 300 Bit/s – 19.2 kBit/s 300 Bit/s – 19.2 kBit/s 300 Bit/s – 19.2 kBit/s 300 Bit/s – 19.2 kBit/s 300 Bit/s – 19.2 kBit/s
S7-400 300 Bit/s – 19.2 kBit/s 300 Bit/s – 19.2 kBit/s 300 Bit/s – 19.2 kBit/s 300 Bit/s – 19.2 kBit/s 300 Bit/s – 19.2 kBit/s
Bridgeable distance 1000m 1000m 1000m 1000m 1000m
S7-200 300 Bit/s – 38.4 kBit/s No No No No
RS422 /
RS485
2 2
S7-300 300 Bit/s – 76.8 kBit/s 300 Bit/s – 76.8 kBit/s 300 Bit/s – 76.8 kBit/s 300 Bit/s – 76.8 kBit/s 300 Bit/s – 76.8 kBit/s
2 2
S7-400 300 Bit/s – 115.2 kBit/s 300 Bit/s – 115.2 kBit/s 300 Bit/s – 115.2 kBit/s 300 Bit/s – 76.8 kBit/s 300 Bit/s – 76.8 kBit/s
Bridgeable distance 1200 m 1200 m 1200 m 1200 m 1200 m
Data connection Small – medium data amounts Small – medium data amounts Small – medium data amounts Small data amounts Small – medium data amounts
mance
Perfor
suitable for:
Evaluation
1
) Can be achieved when using the PC/PPI cable.
2
) RS485 is not applicable here.
Connection case
The task is to exchange data from one station to several stations connected via a serial
interface.
Hardware scheme
This hardware constellation is made up as follows:
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Figure 2-12
The stations, Station 1, Station 2 up to Station n, respectively consist of one
CPU as well as a serial communication processor. All stations are physi-
cally connected with each other via the serial interface. The data are trans-
ferred via the respectively available interface variants and the available pro-
tocol driver.
Table 2-45
Station 1 S7-200 S7-300 S7-400
RS 485 SS RS 232, TTY, RS 422/485 RS 232, TTY, RS 422/485
Station 2 - n
S7-200 via ´modem ± Loadable driver (e.g. Mod- Loadable driver (e.g. Mod-
bus Master Broadcast) bus Master Broadcast)
S7-300 ± Loadable driver (e.g. Mod- Loadable driver (e.g. Mod-
bus Master Broadcast) bus Master Broadcast)
S7-400 ± Loadable driver (e.g. Mod- Loadable driver (e.g. Mod-
bus Master Broadcast) bus Master Broadcast)
± = not applicable
Table 2-46
Protocol Modbus
Criterion Master
Data range 1 – 255 bytes
Connected stations 1 – 1bidirectional
S7-200 No
RS232
S7-200 No
20982954_SIMATIC_Comm_DOKU_v10_e
RS422 /
RS485
suitable for:
Evaluation
Introduction
The following chapter shows successively all possible hardware constella-
tions enabling a data transfer via the SIMATIC backplane bus.
You will find a detailed bus description of the bus system discussed here in
the document “Selection criteria for networks and services”.
http://support.automation.siemens.com/WW/view/en/21045102
Table 2-47
20982954_SIMATIC_Comm_DOKU_v10_e
Constellation Description
Backplane connection Backplane bus communication between two sta-
tions (CPUs)
Connection case
The task is to exchange data within a station equipped with several CPUs.
Hardware scheme
This hardware constellation is made up as follows:
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Figure 2-13
The station consists of two or several CPUs. All CPUs are physically con-
nected with each other via the backplane bus. The data are exclusively
transferred via the backplane bus.
Table 2-48
Station 1 S7-200 S7-300 S7-400 WinAC-Slot WinAC Basis/RTX
(ab V 4.0)
Station 2
S7-200 ± ± ± ± ±
S7-300 ± ± ± ± ±
S7-400 ± ± S7 basis communication ± ±
S7 communication
global data
WinAC-Slot ± ± ± ± ±
WinAC Basis/RTX ± ± ± ± ±
(as of V 4.0)
± = not applicable
Table 2-49
Protocol S7 basic communication S7 communication Global data
Service
XPUT / XGET XSEND / XRECV BSEND / BRCV USEND / URCV PUT / GET
Criterion
Data range 1 - 84 bytes 1 -76 bytes 1 – 32768 (S7-300) / 1 – 165 bytes 1 – 165 bytes 1 - 22 bytes (S7-300) /
65535 (S7-400) bytes 1 - 64 bytes (S7-400)
Consistency Only guaranteed when Yes Throughout the whole length 8 bytes throughout Yes
sending the whole length
Acknowledgement Operating system of the controller Level 7 Operating system of the controller Operating system of the
mechanism implemented controller
Connected stations 1 – 1 unidirectional 1–1 1 – 1 bidirectional 1 – 1 unidirectional 1-1 / 1-n bidirectional
bidirectional
Configuration type Non-configured connection Bilaterally configured Unilaterally config- Bilaterally configured
ured
Connection type Dyn. / stat connection Dyn. / stat connection Stat connection Stat. connection Stat connection
Client / Server Client / Client Client / Client Client / Server Client / Client
Data connec- Small data amounts Medium to large data Small data amounts Smallest data amounts
Performance
3 Protocol Description
The following chapter contains a collection of protocol descriptions of fre-
quently used protocols supported by SIMATIC S7.
The protocol descriptions on hand are divided into the following four
groups:
Table 3-1
Group Group Name Description
1 Protocols within SIMATIC S7 Contains a description of the protocols
based on SIMATIC S7.
2 Industrial Ethernet Introduces the standard Ethernet proto-
cols supported by SIMATIC S7.
3 PROFIBUS Introduces the standard PROFIBUS
protocols supported by SIMATIC S7.
4 Serial Protocols At last, all of the serial interface protocols
supported by SIMATIC are described,
except for the printer driver.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Introduction
Within the framework of developing the automation system SIMATIC S7,
communication capability of the system was as much an issue as develop-
ment of new hardware components and a new programming software ap-
proach. Concepts which were successfully used for S5 were considered as
well as new approaches and communication principles necessary due to
the modularity of the system. Some of these principles and services are
also available to the SIMATIC S7 user. The following chapter discusses the
resulting user interfaces.
• S7 communication
20982954_SIMATIC_Comm_DOKU_v10_e
Due to the fact that these protocols are not hardware specific, they can also
be used with different bus systems of the used CPUs.
In order to provide an overview of the various communication paths of the
protocols developed for SIMATIC S7 within and outside of SIMATIC S7, a
brief overview of the protocols is given here with regards to the used media.
Table 3-2
Protocol Global data S7 basic com- S7 communica-
munication tion
Bus system
P-bus --- Yes ---
(I/O bus)
Table 3-3
Protocol Global data S7 basic communica- S7 communication
tion
Family
S7-200 --- CPU (Server) CPU (Server)
CP (Client / Server)
S7-300 CPU CPU CPU (Server)
CP (Client / Server)
S7-400 CPU CPU CPU
WinAC-Slot CPU CPU CPU
WinAC-Basis --- --- PC-CPU (Software)
CP-CPU
Copyright © Siemens AG 2005 All rights reserved
It is apparent from this table that the communication load is mainly covered
20982954_SIMATIC_Comm_DOKU_v10_e
Table 3-4
Chapter Protocol
3.1.1 Global data
3.1.2 S7 basic communication (MPI, PB_DP)
3.1.3 S7 communication (IE, PB, MPI)
Basic characteristics
Global data communication enables cyclic data exchange between CPUs
via the MPI interface or the communication bus (C-bus) of S7-400 respec-
tively. Data exchange occurs cyclic during updating the process image of
the inputs and outputs.
On top of cyclic transmission, the S7-400 also enables event controlled
data transmission via default function blocks. This requires functions for
the sending or receiving of data to be called within the application.
The data to be transferred are statically defined within the program and can
be transferred consistently to various global data groups, i.e. defined
groups of stations exchanging global data. With max. 22 bytes (S7-300)
and max. 54 bytes (S7-400) the amount of data to be transferred is rather
low. The data itself can only be transferred to modules which were param-
eterized in the same project and use either the same communication bus at
the backplane bus (C-bus) or MPI-bus.
Copyright © Siemens AG 2005 All rights reserved
Table 3-5
Advantages
1 Simple communication configuration
2 The transfer is consistent.
Disadvantages
1 Only applicable in homogenous SIMATIC S7 structures
2 Only static data transmission possible.
3 Only suitable for smallest data amounts (< 60 bytes)
4 Global data are unacknowledged data.
Table 3-6
Configuration step Engineering-Tool What to do
1. Hardware configura- HW Config In the hardware configuration the
tion of the station modules of the individual stations are
parameterized. The CPU modules are
connected via networking the MPI
interface by selecting the MPI buss, or
via the backplane bus.
2. Open “Global Data S7-Manager Open the Global data editor in the S7
Definition” manager by selecting the MPI-bus in
the root of the project and selecting
the “Define Global Data“ item via the
context menu (right mouse-button).
3. Define Global Data Global data editor Enter the stations in the column head-
ers. Within the table you can now de-
fine the source and target sections of
the individual stations. After the con-
figuration has been completed, com-
pile the data and load all stations with
the new configuration.
GD_SND
Figure 3-1
Table 3-7
Parameter Note
CIRCLE_ID Number of GD group to which the GD packet is to be
sent.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
GD_RCV
Figure 3-2
Table 3-8
Parameter Note
CIRCLE_ID Number of GD group from which the GD packet is to
be received.
BLOCK_ID Number of GD packet to be received in the selected
GD group.
RET_VAL Error information
Note
Detailed information of the parameters of the user interface and its usage is avail-
able in the STEP 7 online help.
Basic characteristics
In the product life of the first S7-300 versions, the demand for an active
communication option became apparent. This active communication option
was created within the framework of the continued development of the S7-
300 by introducing the S7 basic communication.
The S7 basic communication refers to not configured data connections,
which transfer data either via the MPI-bus or the PROFIBUS DP. The used
connections are dynamic, i.e. they are generated by the application and
can also be released again.
Note
Cancel functions are also provided for the connections used by both services,
however, as these are not directly involved in the data transfer, they are not further
discussed in this document. Further information on these functions are available in
the “STEP 7 – System and standard functions for S7-300 and S7-400“ as well as
the STEP 7 Online help.
Table 3-10
Chapter Service
3.1.2.1 I functions
3.1.2.2 X-functions
3.1.2.1 I functions
Note
The I-Abort function is available for disconnecting connections used for I-
Copyright © Siemens AG 2005 All rights reserved
functions. This function is described in the “STEP 7 - System and standard func-
20982954_SIMATIC_Comm_DOKU_v10_e
Table 3-11
Advantages
1 No communication configuration necessary.
2 Dynamic and variable data transfer possible.
3 Connection resources can be controlled by the application in the
logic controller.
Disadvantages
1 Only applicable in homogenous SIMATIC S7 structures
2 The transfer is inconsistent.
3 Only suitable for small data amounts (< 100 bytes)
Configuration of I-functions
The I-functions themselves need not be configured.
The basis of these functions are the hardware addresses configured in the
hardware configuration. These are necessary for each communication
partner. For parameterizing the module, it is furthermore necessary to know
whether the addressed module is a module with inputs or outputs.
I_PUT
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Figure 3-3
Table 3-12
Parameter Note
REQ Job trigger for the PUT job
CONT Parameter for determining whether the connection
should be maintained after completing the job, or
whether it should be disconnected.
IOID Identifier of the address range of the partner module
LADDR Logic address of the partner module in the address
section of the CPU.
VAR_ADDR Reference to the target data area of the partner mod-
ule.
SD Reference to the source data area of the local CPU
RET_VAL Error information if an error occurs in the course of the
function.
BUSY Status information of the function being actively per-
formed.
I_GET
Figure 3-4
Table 3-13
Parameter Note
REQ Job trigger for the GET job
CONT Parameter for determining whether the connection
should be maintained after completing the job or
Copyright © Siemens AG 2005 All rights reserved
Note
Detailed information on the parameters of the user interface and their usage is
available in the STEP 7 online help or the “STEP 7 - System and standard func-
tions for S7-300 and S7-400“ manual.
Application examples
For this protocol, a pre-coded example was created.
Table 3-15
Application title/ Entry-ID Description
Client / server communication with (I) Slaves This Application is meant to help the user to simply,
quickly and practically learn about the client/server
Copyright © Siemens AG 2005 All rights reserved
3.1.2.2 X-functions
Note
The X-Abort function is available for disconnecting connections used for X-
functions. This function is described in the “STEP 7 - System and standard func-
tions for S7-300 and S7-400“ manual.
Table 3-16
Advantages
1 No communication configuration necessary.
2 Dynamic and variable data transfer possible
3 Connection resources can be controlled by the application.
4 Client–Server as well as Client–Client services are possible.
Disadvantages
1 Only applicable in homogenous SIMATIC S7 structures
2 Inconsistent transmission with X_PUT / X_GET functions.
3 Only suitable for small data amounts (< 100 bytes)
Configuration of X-functions
The X-functions themselves need not be configured.
The basis of these functions are the MPI addresses configured in the hard-
ware configuration. They are necessary for each communication partner.
Other details are not necessary.
Figure 3-5
Table 3-17
Parameter Note
REQ Job trigger for the PUT job
CONT Parameter for determining whether the connection
should be maintained after completing the job, or
whether it should be disconnected.
DEST_ID The MPI address of the partner module configured in
STEP 7.
VAR_ADDR Reference to the target data area in the partner mod-
ule.
SD Reference to the source data area in the local CPU
RET_VAL Error information if an error has occurred in the course
of the function.
BUSY Status information of the function being actively per-
formed.
Figure 3-6
Table 3-18
Parameter Note
REQ Job trigger for the GET job
CONT Parameter for determining whether the connection
should be maintained after completing the job, or
whether it should be disconnected.
Copyright © Siemens AG 2005 All rights reserved
STEP 7.
VAR_ADDR Reference to the source data area in the partner mod-
ule.
RET_VAL Error information if an error has occurred in the course
of the function.
BUSY Status information of the function being actively per-
formed.
RD Reference to the target data area in the local CPU
Figure 3-7
Table 3-19
Parameter Note
REQ Job trigger for the SEND job
CONT Parameter for determining whether the connection
should be maintained after completing the job, or
whether it should be disconnected.
DEST_ID The MPI address of the partner module configured in
STEP 7.
REQ_ID Job identifier for identifying the data at the communica-
tion partner
SD Reference to the source data area in the local CPU
RET_VAL Error information if an error has occurred in the course
of the function.
BUSY Status information of the function being actively per-
formed.
Figure 3-8
Table 3-20
Parameter Note
EN_DT The control parameter “enable data transfer“ enables
controlling the data transfer.
RET_VAL Error information if an error has occurred in the course
of the function.
REQ_ID Received job identifier for identifying the data at the
sender
NDA Status parameter indicating the value “True” if new
data has been received .
RD Reference to the target data area in the local CPU
Note
Further detailed information on the parameters of the user interface and its usage
is available in the STEP 7 online help or the following manual: “STEP 7 - System
and standard functions for S7-300 and S7-400“.
Quantity frameworks
Table 3-21
Characteristic Range of values
Data area per job 1 - 76 bytes
Interface Level 7 of the ISO/OSI-reference model
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Application examples
For this protocol, a pre-coded example was created.
Table 3-22
Application title/ Entry-ID Description
N to 1 Synchronization of Data in the MPI This Application describes synchronizing a system of
Network via S7 Basic Communication four S7-300 stations. After a trigger pulse at a digital
(X_SEND/ X_RCV) input three to four S7 stations send data to a fourth
station via a dynamic connection, the defined master.
Entry-ID: 20989875
Basic characteristics
Within SIMATIC S7, the S7 protocol was designed as a standard protocol
for communication.
From a historical point of view, the S7-400 was planned as a single Client
system for this communication. The continued development of the S7-300
family and the S7-200 family enabled providing these module families with
Client functions for S7 communication. This was made possible with the
application of communication processors.
The huge advantage of this protocol is its independence from the hard-
ware. This guarantees communication within SIMATIC S7 via one user in-
terface, irrespective of which a communication bus system is being
used.
The configured communication relations are designed either unidirec-
tional or bidirectional, so that:
• Client / Client relationships
• Client – Server relationships
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
can be generated.
The data to be transferred are application data, as the communication inter-
face is located on level 7 of the ISO-OSI reference mode.
Table 3-23
Chapter Service
3.1.3.1 PUT / GET
3.1.3.2 USEND / URCV
3.1.3.3 BSEND / BRCV
Table 3-24
Configuration step Engineering-Tool What to do
1. Hardware configura- HW Config The bus to be used as well as the module
tion of the station to be employed are selected in hardware
configuration
2. Selecting the connec- NetPro In the first step the modules, between
tion partner which the connection is to be configured,
are selected in NetPro
3. Configuring the con- NetPro In the second step, the protocol is se-
nection lected. It must be taken into account
whether a Client-Client or a Client-Server
relationship is to be established. If neces-
sary, the connection must be defined as
“unilateral“.
4. Programming LAD / FBD / STL editor The user data areas to be sent or re-
ceived are transmitted via the user inter-
face. This occurs irrespective of the used
communication relationship and especially
of the used service.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Note
In-depth information and a detailed step-by-step description on configuring an S7
connection is available in chapter 6.3.1 ”Configuring an S7 connection“ of the fol-
lowing documentation: “S7 Communication via Profibus CPs with BSEND /
BRECEIVE and several Job References (R_IDs)”
Basic characteristics
The PUT / GET function blocks form the interface to the Client-Server
functions of the S7 communication. They only need to be configured and
applied on the client side. Programming of blocks on the server side
is not necessary, as the functionality is based on operating system func-
tions.
Consistency of the data to be transferred can only be provided to a lim-
ited extent, as, depending on the used operating system of the CPU, dif-
ferent data amounts can be transmitted to the process.
The amount of transferable data depends on the employed bus system:
Table 3-25
Bus system max. data length
MPI Approx. 165 bytes
PROFIBUS Approx. 165 bytes
Industrial Ethernet Approx. 400 bytes
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Table 3-26
Advantages
1 The functions can be applied to different bus systems.
2 Dynamic and variable data transfer possible
3 The data are acknowledged by the operating system of the receiving
station.
4 The static connection must only be configured unilaterally.
Disadvantages
1 Only applicable in homogenous SIMATIC S7 structures
2 Inconsistent transfer possible.
3 Only suitable for small to medium data amounts (< 500 bytes), de-
pending on employed bus system
4 Extensive control procedures slow down the transmission rate.
Figure 3-9
Table 3-27
Parameter Note
REQ Job trigger for the PUT job
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Figure 3-10
Table 3-28
Parameter Note
REQ Job trigger for the GET job
ID Connection ID according to the configuration in NetPro
NDR Status display for the successfully completed write
read job.
ERROR Error information if an error occurs in the course of the
function.
STATUS Status display for detailed information about the status
of a block or about an error.
ADDR_i Area information on the data areas to be read in the
partner CPU.
RD_i Area information on the target area within the local
CPU
Note
Further detailed information on the parameters of the user interface and its usage
is available in the STEP 7 online help or the following manual: “STEP 7 - System
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Quantity frameworks
Table 3-29
Characteristic Range of values
Data area per job 1 - 165 bytes (at MPI or PROFIBUS)
1 – 400 bytes (at Industrial Ethernet)
Interface Level 7 of the ISO/OSI-reference model
Number of possible connection 2 (0) - 32 connections depending on CPU and
resources setting (S7-300)
16 -64 connections depending on CPU (not
selectable) (S7-400)
Application examples
For this protocol, a pre-coded example was created.
Table 3-30
Application title/ Entry-ID Description
Client Server Communication between Wi- This Application describes synchronizing substations
nAC Basis and S7-200 stations via S7 Com- by means of a server station. On request, the server
munication (PUT/GET) station transmits up to 3 different data records to the
substations.
Entry-ID: 20987586
Basic characteristics
The USEND / URCV function blocks are the asynchronous interfaces of
the Client-Server functions offered for the S7 communication. Program-
ming of the function blocks as well as configuring the connection is
necessary at both communication partners.
Data consistency is guaranteed using function blocks for the transmis-
sion.
In contrast to the synchronous BSEND / BRCV interface, the USEND /
URCV function blocks are acknowledged by the operating system. This
enables data transmission independently from the partner. The applica-
tion of the communication partner can hence always access the most cur-
rent data.
The amount of transferable data depends on the employed bus system:
Table 3-31
Bus system max. data length
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Table 3-32
Advantages
1 The functions can be applied to different bus systems.
2 Dynamic and variable data transfer possible
3 The data are acknowledged by the operating system of the receiving
station.
4 The transfer is consistent.
5 Uncoordinated data transfer, i.e. the communication partner needs
not acknowledge each date. Only the latest, current data is acknowl-
edged hence used.
Disadvantages
1 Only applicable in homogenous SIMATIC S7 structures
2 The static connection must be configured bilaterally.
3 Only suitable for small to medium data amounts (< 500 bytes), de-
pending on employed bus system
4 Extensive control procedures slow down the transmission functions.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Figure 3-11
Table 3-33
Parameter Note
REQ Job trigger for the USEND job
ID Connection ID according to the configuration in NetPro
R_ID Parameter for sub-addressing within a connection.
Both partner function blocks must use the same value.
DONE Execution information for the successfully completed
write send job.
Parameter Note
ERROR Error information if an error occurs in the course of the
function.
STATUS Status display for detailed information about the status
of a block or about an error.
SD_i Area information on the source area within the local
CPU
Figure 3-12
Table 3-34
Parameter Note
EN_R Job trigger for the URCV job
ID Connection ID according to the configuration in NetPro
R_ID Parameter for sub-addressing within a connection.
Both partner function blocks must use the same value.
NDR Execution information for the successfully completed
write receive job.
ERROR Error information if an error has occurred in the course
of the function.
STATUS Status display for detailed information about the status
of a block or about an error.
RD_i Information on the target data areas within the local
CPU
Note
Further detailed information on the parameters of the user interface and its usage
is available in the STEP 7 online help or the following manual: “STEP 7 - System
and standard functions for S7-300 and S7-400“.
Quantity frameworks
Table 3-35
Characteristic Range of values
Data area per job 1 - 165 bytes (at MPI or PROFIBUS)
1 -440 bytes (at Industrial Ethernet)
Interface Level 7 of the ISO/OSI-reference model
Number of possible connection 2 (0) - 32 connections depending on CPU and
resources setting (S7-300)
16 -64 connections depending on CPU (not
selectable) (S7-400)
Basic characteristics
The BSEND / BRCV function blocks are the synchronous interface of the
Client-Client functions offered for the S7 communication. The function
blocks are necessary for both communication partners and must be ap-
plied synchronously, i.e. be called cyclically in both user programs. Fur-
thermore, configuring the connection at both communication partners
is also necessary here.
Data consistency is guaranteed using function blocks for the transmis-
sion.
In the case of the BSEND / BRCV function blocks, there is a direct hand-
shake between the send and the receive block. This way, the sender re-
ceives an acknowledgement for each transmitted message segment from
the receive block. This enables transferring very large data amounts, up
to 64 kBytes for S7-400, and 32 kBytes for S7-300. In the case of BSEND /
Copyright © Siemens AG 2005 All rights reserved
Table 3-36
Advantages
1 The functions can be applied to different bus systems.
2 Dynamic and variable data transfer possible
3 Each data segment is acknowledged by the received function block of
the receive station.
4 The transfer is consistent.
5 Data is transferred block oriented, i.e. the entire data is divided into
individual blocks and transmitted to the receive station in segments.
6 Large data amounts up to 64 kByte (S7-400) can be transmitted.
Disadvantages
1 Only applicable in homogenous SIMATIC S7 structures
2 The static connection must be configured bilaterally.
3 Extensive control procedures considerably slow down the transmis-
sion functions.
Figure 3-13
Table 3-37
Parameter Note
EN_R Job trigger for the BSEND job
R Input for actively resetting the function.
ID Connection ID according to the configuration in NetPro
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Figure 3-14
Table 3-38
Parameter Note
EN_R Job trigger for the BRCV job
ID Connection ID according to the configuration in NetPro
R_ID Parameter for sub-addressing within a connection.
Both partner function blocks must use the same value.
NDR Execution information for the successfully completed
write receive job.
ERROR Error information if an error has occurred in the course
of the function.
STATUS Status display for detailed information about the status
of a block or about an error.
RD_1 Information on the target data area within the local
CPU
LEN Length of received data area
the “S7 Communication via Profibus CPs with BSEND / BRECEIVE and
several Job References (R_IDs)” application
Figure 3-15
It must be noted that in the application on hand, four different data packets
were transferred via four different R_IDs between sender and receiver. The
measuring range of the application is between 16 and 8092 bytes.
The graph indicates the approximately linear course between the measured
transmission time and the transferred data amount.
Quantity frameworks
Table 3-39
Characteristic Range of values
Data area per job 1 -32768 bytes (for S7-300)
1 -65536 bytes (for S7-400)
Interface Level 7 of the ISO/OSI-reference model
Number of possible connection 2 (0) - 32 connections depending on CPU and
resources setting (S7-300)
16 -64 connections depending on CPU (not
selectable) (S7-400)
Application examples
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Table 3-40
Application title/ Entry-ID Description
S7 Communication via Profibus CPs with This application is an automatic test program to ex-
BSEND / BRECEIVE and several Job Refer- change data between two stations on up to 4 R_Ids,
ences (R_IDs) respectively via an S7 connection, when operated
under stress i.e. continuous data exchange between
Entry-ID: 20987358 the stations. The application can hence recognize
errors and react accordingly in a directed (default)
manner.
Cross-subnet data record routing via gateway This application illustrates an implementation of a
CPU using S7 communication functioning data record routing using a programmed
(BSEND/BRECEIVE) application example . Via a gateway station, config-
urable data are passed on from one station to a
Entry-ID: 20983154 defined other station located in a different network.
Introduction
An increasing demand for communication possibilities developed due to the
increasing level of automation and systematization of production proc-
esses. Aside from the field bus systems, this communication possibility was
intended to enable the connection of individual manufacturing cells or to
other company divisions. The IEEE 802.3 Ethernet standard developed into
the preferred bus system due to its wide use in office communication and
WAN networking. For industrial use, however, it was required to improve
the immunity and robustness of the individual components which lead to
the Industrial Ethernet standard.
• star or
20982954_SIMATIC_Comm_DOKU_v10_e
• ring topology;
hybrid configurations are also possible. Aside from the physics, a protocol
is also required for the data transfer.
Fig. 3-16
Above layer 2, the IP-stack and ISO-stack based protocols form large
groups. For detailed information on the two stacks, please refer to the re-
spective protocol descriptions.
2 layers can be located for the user.
• The level closest to the hardware is level 4 (Transport Layer). On this
level, raw data are exchanged between stations via transport jobs.
• The level closest to the application is level 7 (Application Layer). On this
level, application data or data structures are transferred to other applica-
tions.
These differences also affect the user interfaces of the individual protocols.
Table 3-41
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Chapter Protocol
Basic properties
Historically, the ISO Transport protocol, as level 4 interface of the ISO-
OSI reference model, was the first Ethernet protocol in SIMATIC. The ISO
Transport protocol is based on the ISO protocol defined in ISO 8073 TP0.
The main advantage of this protocol is the message-oriented transfer of
the data which facilitates processing within an automation system.
Since the ISO Transport protocol lacks layer 3 implementation, network ad-
dressing and thus routing are not possible.
Due to the good determinability of the data transfer, the ISO Transport pro-
tocol is – unlike TCP – also suitable for fault-tolerant systems.
A connection of S5 systems is also possible with this protocol. However,
the latest S7-300 modules no longer support this protocol.
Note
In the SIMATIC S7 the Fetch / Write service is only implemented as server func-
tionality. Therefore, the SIMATIC S7 cannot actively read or write data. Clients
are capable of actively reading data from or writing data into the S7.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Table 3-42
Advantages
1 Quick communication protocol since it is very hardware-intimate.
2 Suitable for medium-sized to large data amounts ((<=8192 bytes).
3 The transfer is message-oriented.
4 Dynamic data lengths are possible.
Disadvantages
1 Mainly applicable in SIMATIC homogenous structures.
2 Increased programming effort required for data management due to
the SEND / RECEIVE programming interface.
Table 3-43
Configuration step Engineering tool What has to be done
1. Hardware configura- HW Config The bus to be used and the module
tion of the station used are selected in the hardware
configuration.
2. Select connection NetPro The first step in NetPro is to select the
partner modules between which the connec-
tion is configured.
3. Connection configu- NetPro The second step is the selection of the
ration protocol to be used. (See note)
4. User programming LADDER/FBD/Statement The user data areas to be sent or
List Editor received are transferred to the com-
munication process via the user inter-
face.
Note
The configuration of ISO Transport connections is comparable to the configuration
of ISO on TCP connections. Further information on the configuration of ISO on
TCP connections is available in chapter 5.3 of the documentation: “Comparison of
data transfer via one and via four parallel ISO-on-TCP connections on Industrial
Ethernet”
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
AG_SEND / AG_LSEND
Fig. 3-17
Table 3-44
Parameter Comment
ACT Job triggering for the SEND job.
ID Connection ID according to the configuration in NetPro.
LADDR Hardware address of the module in the hardware configura-
tion.
SEND Specification of the send area of the data area to be sent.
Parameter Comment
LEN Specification of the length of the data area to be sent.
DONE Execution display for the completed send job.
ERROR Error display if an error occurs during the function.
STATUS Status display for detailed information on the status of the
block.
AG_RECEIVE / AG_LRECEIVE
Fig. 3-18
Copyright © Siemens AG 2005 All rights reserved
Table 3-45
20982954_SIMATIC_Comm_DOKU_v10_e
Parameter Comment
ID Connection ID according to the configuration in NetPro.
LADDR Hardware address of the module in the hardware configura-
tion.
RECV Specification of the area of the receive buffer.
NDR Execution display for the completed reception of a com-
plete message.
ERROR Error display if an error occurs during the function.
STATUS Status display for detailed information on the status of the
block.
LEN Length of the received data area.
Note
For detailed information on the parameters of the user interface and their use
please refer to the STEP 7 online help.
Basic properties
TCP/IP (Transmission Control Protocol / Internet Protocol) developed in the
70s of the 20th century. The intention of the US Department of Defense,
which ordered the protocol, was to increase the number of networks used
militarily.
Due to the commercial development of the Internet, TCP/IP has estab-
lished itself as standard protocol – also on different bus systems.
Due to the standardization of the protocol, implementing this protocol in
automation technology suggested itself. Due to the fact that it is widely
used in operating systems and due to its availability TCP/IP facilitates the
connection of SIMATIC to PCs and mainframes.
Note
In the SIMATIC S7 the Fetch / Write service is only implemented as server func-
tionality. Therefore, the SIMATIC S7 cannot actively read or write data. Clients
are capable of actively reading data from or writing data into the S7.
Table 3-47
Advantages
1 Quick communication protocol since it is very hardware-intimate.
2 Suitable for medium-sized to large data amounts ((<=8192 bytes).
3 The protocol can be used very flexibly with third-party systems which
exclusively support TCP.
4 The protocol is routing-capable.
5 The protocol is acknowledged.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Disadvantages
1 Only static data lengths applicable.
2 Increased programming effort required for data management due to
the SEND / RECEIVE programming interface.
3 The data transfer is stream-oriented.
Table 3-48
Configuration step Engineering tool What has to be done
1. Hardware configura- HW Config The bus to be used and the module
tion of the station used are selected in the hardware
configuration.
2. Select connection NetPro The first step in NetPro is to select the
partner modules between which the connec-
tion is configured.
3. Connection configu- NetPro The second step is the selection of the
ration protocol to be used. (See note)
4. User programming LADDER/FBD/Statement The user data areas to be sent or
List Editor received are transferred to the com-
munication process via the user inter-
face.
Note
The configuration of TCP connections is comparable to the configuration of ISO on
TCP connections. Further information on the configuration of ISO on TCP connec-
tions is available in chapter 5.3 of the documentation: “Comparison of data transfer
via one and via four parallel ISO-on-TCP connections on Industrial Ethernet”
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
AG_SEND / AG_LSEND
Fig. 3-19
Table 3-49
Parameter Comment
ACT Job triggering for the SEND job.
ID Connection ID according to the configuration in NetPro.
LADDR Hardware address of the module in the hardware configura-
tion.
SEND Specification of the send area of the data area to be sent.
LEN Specification of the length of the data area to be sent.
Parameter Comment
DONE Execution display for the completed send job.
ERROR Error display if an error occurs during the function.
STATUS Status display for detailed information on the status of the
block.
AG_RECEIVE / AG_LRECEIVE
Fig. 3-20
Table 3-50
Copyright © Siemens AG 2005 All rights reserved
Parameter Comment
20982954_SIMATIC_Comm_DOKU_v10_e
Note
For detailed information on the parameters of the user interface and their use
please refer to the STEP 7 online help.
Basic properties
The main advantage of the ISO Transport protocol is the message-
oriented transfer of the data. The missing routing functionality, however,
developed into an increasingly growing disadvantage due to advancing link-
ing in network.
As the routing-capable TCP/IP became more and more successful it was
tried to combine the advantages of both protocols. In RFC 1006 (RFC =
Request for Comments) “ISO on top of TCP”, also called “ISO on TCP”, the
mapping of the ISO Transport properties to TCP/IP is established.
ISO on TCP is also located on level 4 of the ISO-OSI reference model
and defines port 102 as default port for the data transfer.
This protocol can continuously be used in the current modules of the S7
and, using CP 1430 TCP, also in S5.
• Send / Receive
Send / Receive is a service used to actively transfer data between two cli-
ent stations. In this process, data are exchanged between the applications
by means of send / receive function blocks between the stations.
• Fetch / Write (server)
Fetch / Write is a service used to read out data from or write data into a
server station. Access is performed via the operating system of the passive
server station without further function calls in the server station.
Note
In the SIMATIC S7 the Fetch / Write service is only implemented as server func-
tionality. Therefore, the SIMATIC S7 cannot actively read or write data. Clients
are capable of actively reading data from or writing data into the S7.
Table 3-52
Advantages
1 Quick communication protocol since it is very hardware-intimate.
2 Suitable for medium-sized to large data amounts ((<=8192 bytes).
3 Routing-capable (i.e. can be used in WAN)
Disadvantages
1 Mainly applicable in SIMATIC homogenous structures.
2 Increased programming effort required for data management due to
the SEND / RECEIVE programming interface.
3 Separate configuration for routers required since the used port is
usually not enabled.
Table 3-53
Configuration step Engineering tool What has to be done
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
AG_SEND / AG_LSEND
Fig. 3-21
Table 3-54
Parameter Comment
ACT Job triggering for the SEND job.
ID Connection ID according to the configuration in NetPro.
LADDR Hardware address of the module in the hardware configura-
tion.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
AG_RECEIVE / AG_LRECEIVE
Fig. 3-22
Table 3-55
Parameter Comment
ID Connection ID according to the configuration in NetPro.
LADDR Hardware address of the module in the hardware configura-
tion.
RECV Specification of the area of the receive buffer.
NDR Execution display for the completed reception of a com-
plete message.
ERROR Error display if an error occurs during the function.
Parameter Comment
STATUS Status display for detailed information on the status of the
block.
LEN Length of the received data area.
Note
For detailed information on the parameters of the user interface and their use
please refer to the STEP 7 online help or the corresponding application example of
this protocol.
Quantity frameworks
Table 3-56
Characteristic Range of values
Data area per job 1 – 8192 bytes
Interface Level 4 of the ISO / OSI reference model
Number of possible connec- Up to 16 per S7-300 CP,
tions up to 64 per S7-400 CP
Application examples
For this protocol, pre-coded examples were created.
Table 3-57
Application title/ Entry-ID Description
Comparison of data transfer via one and via This Application compares the sending of a variable
four parallel ISO-on-TCP connections on data record via one or four Ethernet connections.
Industrial Ethernet
Entry-ID: 20987359
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Basic properties
Within the framework of the IP development, UDP (User Datagram Proto-
col) was created along with TCP on the transport layer of IP.
The intention of developing this protocol was to develop a datagram-
capable protocol which can also be operated on routing-capable networks.
The main advantage of a datagram-capable protocol is the fact that it is
multicast- as well as broadcast-capable. The transfer of datagram mes-
sages is connectionless, i.e. they are not acknowledged e.g. by the desti-
nation station. For this reason the application has to perform the acknowl-
edgement for the secure operation of the data transfer; however, this does
not affect the advantages of UDP regarding speed, simplicity or flexibility.
• Send / Receive
20982954_SIMATIC_Comm_DOKU_v10_e
Send / Receive is a service used to actively transfer data between two cli-
ent stations. In this process, data are exchanged between the applications
by means of send / receive function blocks between the stations.
Table 3-58
Advantages
1 Very quick communication protocol since it is very hardware-intimate.
2 Suitable for small to medium-sized data amounts ((<=2048 bytes).
3 The protocol can be used very flexibly and with third-party systems.
4 The protocol is routing-capable.
5 The protocol is multicast- / broadcast-capable.
Disadvantages
1 The protocol is unacknowledged, i.e. securing the communication
requires a checking in the program.
2 Increased programming effort required for management of data and
also connection partners due to the SEND / RECEIVE programming
interface.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Table 3-59
Configuration step Engineering tool What has to be done
1. Hardware configura- HW Config The bus to be used and the module
tion of the station used are selected in the hardware
configuration.
2. Select connection NetPro The first step in NetPro is to select the
partner modules between which the connec-
tion is configured.
3. Connection configu- NetPro The second step is the selection of the
ration protocol to be used. (See note)
4. User programming LADDER/FBD/Statement The user data areas to be sent or
List Editor received are transferred to the com-
munication process via the user inter-
face.
Note
For further information and a detailed step-by-step description of the configuration
of multicast or unspecified connections please refer to chapter 5.3 of the documen-
tation: “Master-Slave Communication via Ethernet with UDP Using Multicast and
Unspecified Connections”
AG_SEND / AG_LSEND
Fig. 3-24
Table 3-60
Parameter Comment
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
AG_RECEIVE / AG_LRECEIVE
Fig. 3-25
Table 3-61
Parameter Comment
ID Connection ID according to the configuration in NetPro.
LADDR Hardware address of the module in the hardware configura-
tion.
RECV Specification of the area of the receive buffer.
NDR Execution display for the completed reception of a com-
plete message.
ERROR Error display if an error occurs during the function.
STATUS Status display for detailed information on the status of the
block.
LEN Length of the received data area.
Note
For detailed information on the parameters of the user interface and their use
please refer to the STEP 7 online help.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Fig. 3-26
The graphic above shows the time sequence of a data transfer from one
sender to two receivers with acknowledgement by the user program. The
linear sequence between user data length and message runtime is visible
in the figure.
Application examples
A pre-coded example was created for this protocol.
Table 3-63
Copyright © Siemens AG 2005 All rights reserved
3.3 PROFIBUS
Introduction
Nowadays, it is impossible to imagine an automation system without field
bus interface. Field bus has successfully established itself in industrial
automation solutions. Several different bus systems are available, but
PROFIBUS seems to become increasingly accepted in this field due to its
openness and worldwide use.
the deterministics of the bus system can be preset via a predefined bus
20982954_SIMATIC_Comm_DOKU_v10_e
time; due to this, a fixed period of time for sending data is assigned to each
station.
In PROFIBUS the data are transferred via two-wire cables. Additionally, an
optical variant using fiber optic or plastic optical fiber conductors has devel-
oped for data transfer over large distances or through areas with EMC.
Photoelectric barriers or infrared transfer options were developed for the
transfer over small distances without direct electrical connection.
PROFIBUS networks can have a:
• Linear bus or
• ring topology (only optical)
Aside from the physical configuration of PROFIBUS, the protocols were
also defined in its normalizing.
Protocols of PROFIBUS
The protocols described in the original PROFIBUS standard (FDL and
FMS) were supplemented by partly proprietarily developed protocols.
These protocols are partly published and have influenced the normalizing.
Yet, the basis of each protocol is the standard and thus the FDL protocol
with its services.
Fig. 3-27
For the user the protocols are divided into 3 groups:
• The hardware-intimate FDL layer of level 2. The Data Link Layer serves
as basis for all protocols.
• The Application Layer of level 7 via which application data or data struc-
tures are transferred to other applications.
• And, as a special case, the DP protocol which is described in detail in
the protocol description.
The differences between the levels and protocols also affect the user inter-
faces.
Table 3-64
Chapter Protocol
3.3.1 FDL protocol
3.3.2 DP protocol
3.3.3 FMS protocol
Basic properties
The FDL protocol is the basic protocol on which every other PROFIBUS
protocol is based. It is located on level 2 of the ISO-OSI reference model.
One important advantage of the protocol is its speed. The fact that it is
hardware-intimate enables a correspondingly high message throughput.
Another advantage of the protocol is its flexibility. Because of its 4 services
(of which SIMATIC S7 offers 2 as interface) it covers a large range of trans-
fer options.
The SEND / RECEIVE interface is used as interface of the protocol. De-
spite the fact that it is a level 4 interface, this is supported by the lack of
level 3 and 4 in the PROFIBUS model.
Third-party or S5 systems can be connected without difficulty with this pro-
tocol, since the FDL protocol as basic protocol is supported by many
PROFIBUS-capable modules.
Copyright © Siemens AG 2005 All rights reserved
In its original form, the FDL protocol supports the following 5 services:
• SDA (Send Data with Acknowledge)
• SDN (Send Data with No Acknowledge)
• SRD (Send and Request Data with Acknowledge)
• CSRD (Cyclic Send and Request Data)
Within SIMATIC, the two services listed below are actively supported:
Table 3-65
Chapter Service
3.3.1.1 SDA service (Send Data with Acknowledge)
3.3.1.2 SDN service (free layer 2 access) (Send Data with No Acknowledge)
Table 3-66
Configuration step Engineering tool What has to be done
1. Hardware configura- HW Config The bus to be used and the module
tion of the station used are selected in the hardware
configuration.
2. Select connection NetPro The first step in NetPro is to select the
partner modules between which the connec-
tion is configured.
3. Connection configu- NetPro The second step is the selection of the
ration protocol to be used. (See note)
4. User programming LADDER/FBD/Statement The user data areas to be sent or
List Editor received are transferred to the com-
munication process via the user inter-
face.
Note
For further information and a detailed step-by-step description of the configuration
of FDL connections please refer to chapter 6.3.2 of the documentation: “Data Ex-
change with FDL (SDA) by the Use of AG_SEND / AG_RECV”
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
AG_SEND / AG_LSEND
Fig. 3-28
Table 3-67
Parameter Comment
ACT Job triggering for the SEND job.
ID Connection ID according to the configuration in NetPro.
LADDR Hardware address of the module in the hardware configura-
tion.
SEND Specification of the send area of the data area to be sent.
LEN Specification of the length of the data area to be sent.
Parameter Comment
DONE Execution display for the completed send job.
ERROR Error display if an error occurred during the function.
STATUS Status display for detailed information on the status of the
block.
AG_RECEIVE / AG_LRECEIVE
Fig. 3-29
Table 3-68
Copyright © Siemens AG 2005 All rights reserved
Parameter Comment
20982954_SIMATIC_Comm_DOKU_v10_e
Note
For detailed information on the parameters of the user interface and their use
please refer to the STEP 7 online help.
Basic properties
The SDA (Send Data with Acknowledge) service is an acknowledged data
service. It enables a consistent data exchange of up to 240 bytes be-
tween two active stations. Each data packet is followed by an acknowl-
edgement of the receiving station. This ensures a successful and correct
data transfer.
Table 3-69
Advantages
1 Very quick communication protocol since it is very hardware-intimate.
2 The protocol can be used with third-party systems.
3 The data are transferred consistently.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Disadvantages
1 The service is only suitable for small data amounts (<= 240 bytes).
2 Increased programming effort required for management of data and
also connection partners due to the SEND / RECEIVE programming
interface.
Fig. 3-30
The diagram above shows the transfer times for a data amount from 50 to
8092 bytes which was transferred in up to 37 partial data records.
As can be seen in the diagram, there is a linear relation between data
amount and transfer time.
Application examples
A pre-coded example was created for this protocol.
Table 3-71
Application title/ Entry-ID Description
Data Exchange with FDL (SDA) by the Use of This application shows how a data transfer, which
AG_SEND / AG_RECV can transfer a user-defined data amount up to the
maximum DB size, can be realized using the FDL
Entry-ID: 20987711 protocol via PROFIBUS. The transfer is acknowl-
edged on level 2 and in addition on level 7 which was
realized in the application.
Basic properties
The SDN (Send Data with No Acknowledge) service is an unacknow-
ledged bidirectional data service. It enables a consistent data exchange
of up to 236 bytes between two are more stations. Using this service, e.g.
the following connection types are possible:
• Unspecified connections, i.e. the communication partner is addressed in
the user program. In addition, there is the option that user-defined com-
munication partners can successively communicate with a station via
one connection.
• Broadcast connections, i.e. simultaneous sending of messages to sev-
eral receiving stations with only one job. Accordingly, broadcast mes-
sages can be received on the same broadcast connection.
• Multicast connections, i.e. sending of a message to several receiving
stations of a multicast circuit with one job. Accordingly, multicast mes-
sages can also be received on the same multicast connection.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Note
In SIMATIC it is only possible to configure one PROFIBUS broadcast connection. If
a PROFIBUS broadcast connection has been configured, it is not possible to con-
figure an additional PROFIBUS broadcast connection.
Note
The configuration of the user data of the FDL-SDN service contains an additional
header. For the structure of the header, please refer to the manual: “SIMATIC NET
NCM S7 for PROFIBUS Volume 1 of 2”
Table 3-72
Advantages
1 Very quick communication protocol since it is very hardware-intimate.
2 The protocol can be used flexibly also with third-party systems.
3 The data are transferred consistently.
4 Multicast as well as broadcast functions are possible.
Disadvantages
1 The service is only suitable for small data amounts (<= 236 bytes).
2 The transfer is unacknowledged. A user acknowledgement requires
an evaluation of the message in the program.
3 Increased programming effort required for management of data and
also connection partners due to the SEND / RECEIVE programming
Copyright © Siemens AG 2005 All rights reserved
interface.
20982954_SIMATIC_Comm_DOKU_v10_e
3.3.2 DP protocol
Basic properties
On field level, protocols for PROFIBUS with a large number of services or
extensive data editing are unsuitable since these factors would make it im-
possible to reach the required bus cycle time and reaction time.
The PROFIBUS DP (distributed I/O) protocol was developed to be able to
cover the field level within the automation hierarchy. The basic feature of
PROFIBUS-DP is the fact that the user data are displayed in the form of a
cyclic data image. The object-oriented interfaces as used in the FMS or
S7 protocol are completely bypassed. The principle of PROFIBUS-DP
communication is a master-slave system. A master cyclically polls one or
several slaves.
Instead of the user interface, the user interface is located on level 7 (ISO-
OSI reference model) of the DP protocol which, as standardized application
along with DDLM (Direkt Data Link Mapper), is directly based on level 2
(ISO-OSI reference model), thus on FDL.
The following two different types of DP masters exist:
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Table 3-74
Advantages
1 Very quick communication protocol since it is very hardware-intimate.
2 The protocol can also be used with third-party systems.
3 The data transfer is acknowledged.
4 In case of minor or inconsistent data access, access is performed
without function call.
Disadvantages
1 The service is only suitable for small data amounts (<= 244 bytes).
2 The protocol can only transfer static data amounts.
Copyright © Siemens AG 2005 All rights reserved
Table 3-75
Configuration step Engineering tool What has to be done
1. Hardware configura- HW Config The bus to be used and the module
tion of the station used are selected in the hardware
configuration.
2. Hardware configura- HW Config In the next step, the used slave mod-
tion of the slave ules are selected and assigned to the
bus.
3. Hardware configura- HW Config Depending on the slave, also func-
tion of the modules tional modules can be configured de-
pending on the requirement in the
system. It also has to be considered
how the data are transferred to the
master. Consistent data require func-
tion calls in the program.
3. User programming LADDER/FBD/Statement The data are polled by the master by
List Editor direct I/O accesses or using the func-
tion calls.
Note
For a detailed step-by-step description of the configuration of a CPU or a CP DP
master-slave system, please refer to chapter 5.3 of the documentation: “Direct
Data Exchange between separate DP Systems via DP Communication”
Table 3-76
Operating mode DP master DP slave
Block
DP_SEND The block transfers the data of a The block transfers the input data
specified DP output area to the of the DP slave to the PROFIBUS
PROFIUB CP for output to the dis- CP for transfer to the DP master.
tributed I/O.
DP_RECV The block transfers the process The block transfers the output data
data of the distributed I/O as well as transmitted from the DP master into
status information into a specified the DP data area specified on the
DP input area. block.
DP_SEND
Fig. 3-31
Table 3-77
Parameter Comment
CPLADDR Module start address of the CP in HW Config.
SEND Indication of the DP data area to be transferred in the I/O,
bit memory address or data area.
DONE Execution display for the completed send job.
ERROR Error display if an error occurs during the function.
STATUS Status display for detailed information on the status of the
block.
DP_RECV
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Fig. 3-32
Table 3-78
Parameter Comment
CPLADDR Module start address of the CP in HW Config.
RECV Indication of the DP receive data area in the I/O, bit mem-
ory address or data area.
NDR Execution display for the completed reception of a data
area.
ERROR Error display if an error occurs during the function.
STATUS Status display for detailed information on the status of the
block.
DPSTATUS Status display for detailed information on the status of the
bus system.
Note
Detailed information on the parameters and the user interface and their use is
available in the SIMATIC NET NCM S7 for PROFIBUS – Volume 1 manual or in
the STEP7 online help.
Note
The DPWR_DAT / DPRD_DAT interface is only to be used if the size of the consis-
tent data is 3 bytes or more than 4 bytes! For byte, word or double-word access,
direct I/O access can be used.
Table 3-79
Block Task
DPWR_DAT With SFC 15 “DPWR_DAT” (write consistent data to a DP-
norm-slave) you consistently transfer the data from a data
source area to the addressed DP standard slave and into
the process image.
DPRD_DAT With SFC 14 “DPRD_DAT” (read consistent data of a DP-
norm slave) you consistently read out data of a DP standard
slave or one of its modules.
Copyright © Siemens AG 2005 All rights reserved
DPWR_DAT
Fig. 3-33
Table 3-80
Parameter Comment
LADDR This is the configured start address from the output area of
the module which is to be written to.
RECORD This is the source area for the user data to be written. The
length of the source area has to correspond to the config-
ured data area of the respective module.
RET_VAL If an error occurs during processing the function, the return
value contains an error code.
DPRD_DAT
Fig. 3-34
Table 3-81
Parameter Comment
LADDR This is the configured start address from the input area of
the module from which is to be read.
RET_VAL If an error occurs during processing the function, the return
value contains an error code.
RECORD This is the destination area for the read user data. The
length of the destination area has to correspond to the con-
figured data area of the respective module.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Note
Detailed information on the parameters of the user interfaces and their use in the
different modes of the DP modules is available in the STEP7 online help or in the
manuals: “STEP 7 – System and Standard Functions for S7-300 and S7-400” or
”SIMATIC NET NCM S7 for PROFIBUS Volume 1 of 2”
Table 3-82
Condition Frame
Data amount 240 bytes, including 16 bytes acknowledge-
ment
Baud rate 1.5 MBit/sec
Bus profile DP
Master CPU 315 AG 10
Slave CPU 315 AG 10 with CP 342-5 DA 02
Table 3-83
Condition Measured value
Transfer time master -> slave (224 bytes user data) for 100 measurements
Average duration 79 ms
Maximum duration 438 ms
Minimum duration 7 ms
Transfer time slave -> master (224 bytes user data) for 100 measurements
Average duration 33 ms
Maximum duration 51 ms
Minimum duration 19 ms
The measurement of a transfer process lasts from the initiation of the data
transfer in the sending station until the acknowledgement of the data by the
receiving station. The short average time shows the high data throughput of
the used protocol.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Application examples
A pre-coded example was created for this protocol.
Table 3-84
Application title/ Entry-ID Description
Direct Data Exchange between separate DP This application deals with a cost-effective transfer of
Systems via DP Communication data between two DP masters using a DP slave CP
342-5. A data acknowledgement which is evaluated
Entry-ID: 20987807 using the application is additionally added to the DP
protocol.
Basic properties
Along with the FDL protocol, an additional protocol – the FMS protocol –
was specified in the original form of the PROFIBUS specification. Aside
from the field devices, high-quality hierarchical systems were supposed to
be considered via this protocol.
To accomplish this, also a part of the MMS (Manufacturing Message Speci-
fication) from the MAP communication model was complied with along with
the field device connection. This overall model forms the Fieldbus Mes-
sage Specification (FMS).
Levels 3 to 6 don’t exist within PROFIBUS. Level 2 is the application layer,
for the FMS protocol the Lower Layer Interface (LLI) was developed for
level 7. In this LLI, functions of the levels which are not available such as
connection buildup / cleardown and connection monitoring have been im-
plemented for the FMS protocol.
The FMS protocol is object-oriented. All transferred data are transferred
in the form of multi-vendor, standardized communication objects. Each
Copyright © Siemens AG 2005 All rights reserved
Table 3-85
Advantages
1 The protocol can be used flexibly with third-party systems.
2 The data transfer is acknowledged.
3 Access to individual variables or structure elements is possible.
4 Connections to slaves are possible as well as connections between
masters.
Disadvantages
1 Due to its large overhead caused by management information, the
protocol is very slow.
2 The configuration effort is considerable since all variables have to
be defined symbolically and since it may be required to adapt the con-
Copyright © Siemens AG 2005 All rights reserved
nection parameters.
20982954_SIMATIC_Comm_DOKU_v10_e
Table 3-86
Configuration step Engineering tool What has to be done
1. Hardware configura- HW Config The bus and the module used are se-
tion of the station lected in the hardware configuration.
2. Creating the commu- E.g. DB Editor In the DB Editor, the data records to be
nication objects used transferred are programmed in the
form of data blocks.
3. Specifying the com- Symbol Editor In the Symbol Editor, the communica-
munication objects using tion objects are specified in the created
symbols data blocks. Either index or name ad-
dressing can be selected.
4. Selecting connection NetPro First, the modules between which the
partner FMS connection is to be configured
are selected.
5. Connection configura- NetPro The connection FMS connection is
tion selected and the connection parame-
ters are adapted according to the FMS
profile and the functionalities.
6. User programming LADDER/FBD/Statement In the user program, the data areas to
List Editor be transferred are stored in the data
blocks for the function call with the
names and indices.
Fig. 3-35
Table 3-87
Parameter Comment
REQ Job triggering for the READ job.
ID Connection ID according to the configuration in NetPro. It
contains the communication reference and the K bus ID.
VAR_1 Address of the storage location of the communication
variable designation. (See step 5 of the configuration
steps)
RD_1 Address of the data area into which the communication
variable is to be written.
NDR Execution display for the completed read job.
ERROR Error display if an error occurs during the function.
STATUS Status display for detailed information on the status of the
block.
Fig. 3-36
Table 3-88
Parameter Comment
REQ Job triggering for the WRITE job.
ID Connection ID according to the configuration in NetPro. It
contains the communication reference and the K bus ID.
VAR_1 Address of the storage location of the communication
Copyright © Siemens AG 2005 All rights reserved
steps)
SD_1 Address of the data area in which the source data to be
written are stored.
DONE Execution display for the completed write job.
ERROR Error display if an error occurs during the function.
STATUS Status display for detailed information on the status of the
block.
Fig. 3-37
Table 3-89
Parameter Comment
REQ Job triggering for the REPORT job.
ID Connection ID according to the configuration in NetPro. It
contains the communication reference and the K bus ID.
Parameter Comment
VAR_1 Address of the storage location of the communication
variable designation. (See step 5 of the configuration
steps)
SD_1 Address of the data area in which the source data to be
reported are stored.
DONE Execution display for the completed report job.
ERROR Error display if an error occurs during the function.
STATUS Status display for detailed information on the status of
the block.
Note
Detailed information on the parameters of the user interface and their use is avail-
able in the STEP7 online help or in the manual “SIMATIC NET NCM S7 for
PROFIBUS / FMS Manual Volume 2/2”.
Table 3-90
Characteristic Range of values
Number of possible com- S7-300 allow up to:
munication variables - 256 server variables and
- 256 variable descriptions loadable from the
partner.
The variables can be freely distributed to all config-
urable FMS connections.
S7-400 allow up to:
- 512 server variables and
- 2640 variable descriptions loadable from
the partner.
The variables can be freely distributed to all config-
urable FMS connections.
Interface Level 7 of the ISO-OSI reference model
Number of possible connec- Up to 16 connections per S7-300 CP,
tions up to 48 connections per S7-400 CP
Introduction
All protocols and bus systems discussed so far refer to serial protocols on
the lowest levels, i.e. they are transferred individually, successively via a
data line. The difference between these and the following protocols is that
these protocols and architectures have been designed explicitly for multi-
point operation. The following protocols have been exclusively designed for
point-to-point operation, with the exception of the loadable protocol driver.
Some interfaces have proven particularly suitable for the application of
point-to-point connection in automation technology. These interfaces are
available for SIMATIC S7 in the form of integrated interfaces or communi-
cation processors These interfaces are:
• RS 232C (V.24)
• RS 422 / 485 (X.27)
• 20 mA (TTY)
Copyright © Siemens AG 2005 All rights reserved
All three of the available interface systems have different physical and
technological requirements:
Table 3-91
Characteristics RS 232 C (V.24) RS 422/485 (X.27) 20 mA (TTY)
Type of interface Voltage interface Current loop interface Differential voltage in-
terface
Front connector 9 pole Sub-D 9 pole Sub-D 15 pole Sub-D
Max. transmis- up to 115.2 kBit/s up to 19.2 kBit/s up to 115.2 kBit/s
sion rate
Max. max. 15 m max. 1000 m (at 9.5 max. 1,200 m (at 19.2
line length kBit/s) kBit/s)
Corresponds to DIN 66020, DIN 66258 part 1 DIN 66259 part 1 and 3
the norm DIN 66259, EIA-RS 422/485,
EIA-RS 232C, CCITT V.11
CCITT V.24/V.28
Table 3-92
Chapter Protocol
3.4.1 Protocol RK512
3.4.2 Procedure 3964(R)
3.4.3 Free ASCII protocol
Table 3-93
Chapter Protocol
3.4.4 Modbus protocol
3.4.5 Data highway protocol
Basic characteristics
The computer interface RK 512 controls data transfer at bidirectional point-
to-point connection between the local logic controller and a communica-
tion partner.
Hereby the RK 512 protocol uses transport layer, level 4, known from the
ISO-OSI reference model. This provides a very high transmission security.
The services used with the RK 512 are acknowledged.
Table 3-94
Service Description
PUT At a SEND / PUT message, the local station sends a
Copyright © Siemens AG 2005 All rights reserved
Table 3-95
Advantages
1 The protocol can be used well with third-party systems.
2 The data transfer is acknowledged.
3 Reading / writing of individual definable data areas is possible
4 Relative simple configuration and user program development
5 Data safety is very high due to Hamming distance 4.
6 Suitable only for average data amounts (<=1024 bytes).
Disadvantages
1 Due to the high protocol effort, e.g. using the 3964R (on which the
RK 512 is based), the connection performance is not very high.
2 RS 485 cannot be used as bus medium.
Basic characteristics
The procedure 3964 (R) controls data transfer at point-to-point connection
between a local station and a communication partner. Procedure 3964(R)
contains a bit transmission layer (level 1 of the ISO-OSI reference model)
as well as the link layer control (level 2 of the ISO-OSI reference model).
Layer 2, the link layer control, is available in the form of a control charac-
ter. This control character controls the complete and error-free data trans-
mission from the communication partner.
When connecting via the 3964(R) procedure, both communication partners
must be configured with different priorities.
Note
The difference between the procedure 3964 and the procedure 3964R lies in the
transmission of the block check character. At the 3964R procedure, the block
check characters are transferred as well.
Copyright © Siemens AG 2005 All rights reserved
Table 3-97
Advantages
1 The protocol can be used well with third-party systems.
2 The data transfer is acknowledged by the communication partner
(hardware).
3 Data safety is high due to Hamming distance 3.
4 Suitable for average data amounts (<=1024 bytes)
5 The performance of the procedure relative to the data safety is good.
Disadvantages
1 RS 485 cannot be used as bus medium.
2 Coordinated calls of send and receive functions on both sides are
necessary.
Basic characteristics
The ASCII protocol controls data transfer at point-to-point connection be-
tween a local station and a communication partner on the lowest level. The
ASCII protocol contains the bit transmission layer (level 1 of the ISO/OSI
reference model).
The structure of the messages is completely user specific, hence the
development of some protocols based on the ASCII protocol is possible.
Only one end-of-message character must be defined for the received
messages.
Using the ASCII protocol, data with any structure (all printable ASCII
characters from the ASCII table, as far as possible within the parameterized
character framework) can be sent and received.
• SEND
20982954_SIMATIC_Comm_DOKU_v10_e
The SEND function available for the respective system transmits a data
field from a data block. This data field is defined by data block number, start
address and length of the data to be transferred.
• RECEIVE
The RECEIVE function, available for the respective system, transfers re-
ceived data fields from a data buffer into a target area. The target area
within the local station is specified by means of a data block, the start ad-
dress of the data. The length of the received data is given after successful
completion of the function.
Table 3-99
Advantages
1 The protocol can be used well with third-party systems, as it
is entirely based on ASCII code.
2 Suitable for average data amounts (<=1024 bytes)
3 The performance of the procedure is very good, as there is no
header or procedure processing.
4 The entire ASCII character scope can be transferred as data.
Disadvantages
1 The data transfer is unacknowledged.
2 Data safety is very low due to Hamming distance 1, only the
parity bit is used.
3 Coordinated calls from send and receive functions necessary
on both sides.
The large variance of the usable modules and user interfaces does not al-
low for a general statement on the configuration.
For detailed information on the necessary configuration steps please use
the documentation available for your module.
Basic characteristics
Apart from the already introduced protocols, a number of other communica-
tion protocols are also available in the field of automation technology. An
option was created for some of these protocols to be also used within
SIMATIC.
There aren’t any own modules for processing this protocol stack, neither for
the modbus protocol nor for other protocols. The option of connecting sys-
tems which support only this protocol to SIMATIC S7 was nevertheless
created. For this purpose some of the high-end communication processors
for serial communication were provided with reloadable protocol drivers.
Hereby, the stacks and protocol mechanisms necessary for communica-
tion were realized in software form.
The modbus itself is a master-slave system, similar to the already de-
scribed PROFIBUS DP. With both available drivers, you are using the
GOULD-MODBUS protocol in RTU format as master or as slave. This en-
ables connection to Modicon or Honeywell logic controllers. As opposed to
Copyright © Siemens AG 2005 All rights reserved
codes. Furthermore, unlike known from DP, the I/O data are not accessed
cyclically, but data of the logic controller are accessed directly, similar to
S7-communication.
The modbus provides a number of function codes, which by means of the
communication processor are converted to SIMATIC S7 function calls.
From a physics point of view, the interfaces can be operated on:
• RS 232 C,
• 20mA (TTY) as well as on
• RS 422 / 485
Multi-point connections on RS 422/485 are possible, up to 32 slaves can be
connected to a master. In order to set up multi-point networks with other in-
terfaces, further hardware is necessary.
Table 3-101
Functions Slave Master Funktion according to General description
codes MODBUS specification
01 yes yes Read Output Status Reading individual bits
02 yes yes Read Input Status Reading individual bits
03 yes yes Read Output Registers Reading register (words)
04 yes yes Read Input Registers Reading register (words)
05 yes yes Force Single Coil Writing 1 bit
Table 3-102
Advantages
1 Easy connection to Modicon or Honeywell systems.
2 Suitable for small to average data amounts (<=255 bytes)
3 The data transfer is acknowledged.
Disadvantages
1 Considerable configuration and programming effort.
2 The protocol is not widely available within the SIAMTIC.
Table 3-103
Configuration step S7-300 S7-400
1. Configuration of the Not necessary Partner station and used PTP
partner station network are added within the S7
project.
2. Hardware configura- The used modules are defined in the hardware configuration of the
tion of the station station.
3. Defining the basic The Modbus specific parameters are defined via the configuration
parameters of the CP wizard installed with the loadable driver.
4. Assigning interfaces Not necessary Assigning the communication
interface of the communication
processor
5. Properties of other Not necessary Defining the properties of the
station partner station, including assign-
ing the used PtP network.
6. Loading the configu- Loading the configuration data into the used CPU and the CP.
ration data
7. User programming The transmission jobs are triggered and processed via the user inter-
face of the respective services.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Note
The functions available for master and slave interfaces are described in the re-
spective, following interface descriptions.
3.4.4.1 Modbus-Master
The following section gives a description of the user interfaces as well as
the performance data of the Modbus-Master interface.
Figure 3-38
Table 3-104
Parameter Note
SF Select send or receive data, here send data ’S’.
REQ Trigger job with positive edge
R Cancel job with positive edge
LADDR Base address of the communication processor config-
ured in STEP 7
DB_NO Data block number of the data source.
DBB_NO Data byte number of the start byte of the data source.
LEN Length of the data message to be sent
R_TYP Address type of the partner CPU, must be ’X’ here.
Parameter Note
DONE Execution information for the successfully completed
write send job.
ERROR Error display if an error occurred during the function.
STATUS Status display for detailed information about the status
of a block or about an error.
Note:
The further parameters of the block are not required and can remain empty.
Figure 3-39
Table 3-105
Parameter Note
EN_R Receive permission for the P_RCV_RK block.
R Cancel job with positive edge
LADDR Base address of the communication processor config-
ured in STEP 7
DB_NO Data block number of the data source.
DBB_NO Data byte number of the start byte of the data source.
NDR Execution information for the successfully completed
write receive job.
ERROR Error display if an error occurred during the function.
LEN Data length of the received data message
STATUS Status display for detailed information about the status
of a block or about an error.
Figure 3-40
Table 3-106
Parameter Note
EN_R Job trigger for the BSEND job
R Input for actively resetting the function.
ID Connection ID according to the configuration in NetPro.
R_ID Parameter for sub-addressing within a connection.
Both partner function blocks must use the same value.
NDR Execution information for the successfully completed
write receive job.
ERROR Error display if an error occurred during the function.
STATUS Status display for detailed information about the status
of a block or about an error.
SD_1 Information on the send areas within the local CPU
LEN Length of the data area to be sent
Figure 3-41
Table 3-107
Parameter Note
EN_R Job trigger for the BRCV job
ID Connection ID according to the configuration in NetPro.
R_ID Parameter for sub-addressing within a connection.
Copyright © Siemens AG 2005 All rights reserved
Figure 3-42
Table 3-109
Parameter Note
LADDR Base address of the CP
START_TIMER Timer for monitoring time start
START_TIME Time value of monitoring time start
OB_MASK Mask I/O access error and delay alarms.
CPSTART Start FB initialization
CP_START_FM Initialization becomes active with rising edge of
CP_START.
CP_START_NDR Info: Write request from CP
CP_START_OK Startup terminated without error
CP_START_ERROR Startup terminated with error
ERROR_NR Error number
ERROR_INFO Additional error information
Figure 3-43
Table 3-110
Parameter Note
ID Connection ID from NetPro
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Note
Further detailed information on the functions to be used are available in the follow-
ing manual: “Loadable driver for point-to-point CPs MODBUS protocol RTU-format
S7 is Slave”
Basic characteristics
Apart from the already introduced protocols, a number of other communica-
tion protocols are also available in the field of automation technology. An
option was created for some of these protocols to be also used within
SIMATIC.
There aren’t any own modules for processing this protocol stack neither for
the data highway protocol nor for other protocols. The option of connecting
systems which support only this protocol to SIMATIC S7 was nevertheless
created. For this purpose some of the high-end communication processors
for serial communication were provided with reloadable protocol drivers.
Hereby, the stacks and protocol mechanisms necessary for communica-
tion were described in software form.
The Asynchrone Link Full-Duplex (DF1) protocol is used here for trans-
Copyright © Siemens AG 2005 All rights reserved
ferring data. Communication partners can be all modules for which the DF1
20982954_SIMATIC_Comm_DOKU_v10_e
Table 3-112
Advantages
1 Easy connection to Allen Bradley systems.
2 Suitable for average to large data amounts (<=1204 / 4096 bytes)
3 The data transfer is acknowledged.
Disadvantages
1 Considerable configuration and programming effort.
2 The protocol is not widely available within the SIAMTIC.
Table 3-113
Configuration step S7-300
1. Hardware configura- The used modules are defined in the hardware con-
Copyright © Siemens AG 2005 All rights reserved
2. Defining the basic The data highway specific parameters are defined via
parameters of the CP the configuration wizard installed with the loadable
driver.
3. Loading the configura- Loading the configuration data into the used CPU and
tion data the CP.
4. User programming The data are transmitted coordinated to the partner
station via the user interface of the respective mod-
ules.
Figure 3-44
Table 3-114
Parameter Note
SF Select send or receive data, here send data ’S’.
REQ Trigger job with positive edge
R Cancel job with positive edge
LADDR Base address of the communication processor config-
ured in STEP 7
DB_NO Data block number of the data source.
DBB_NO Data byte number of the start byte of the data source.
LEN Length of the data message to be sent
R_TYP Address type of the partner CPU, must be ’X’ here.
DONE Execution information for the successfully completed
write send job.
ERROR Error display if an error occurred during the function.
STATUS Status display for detailed information about the status
of a block or about an error.
Note:
The further parameters of the block are not required and can remain empty.
Figure 3-45
Copyright © Siemens AG 2005 All rights reserved
Table 3-115
20982954_SIMATIC_Comm_DOKU_v10_e
Parameter Note
EN_R Receive permission for the P_RCV_RK block.
R Cancel job with positive edge
LADDR Base address of the communication processor config-
ured in STEP 7
DB_NO Data block number of the data source.
DBB_NO Data byte number of the start byte of the data source.
NDR Execution information for the successfully completed
write receive job.
ERROR Error display if an error occurred during the function.
LEN Data length of the received data message
STATUS Status display for detailed information about the status
of a block or about an error.
Note:
All further parameters of the block are not required and can remain empty.
Figure 3-46
Table 3-116
Parameter Note
EN_R Job trigger for the BSEND job
R Input for actively resetting the function.
ID Connection ID according to the configuration in NetPro.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Figure 3-47
Table 3-117
Parameter Note
EN_R Job trigger for the BRCV job
ID Connection ID according to the configuration in NetPro.
Parameter Note
R_ID Parameter for sub-addressing within a connection.
Both partner function blocks must use the same value.
NDR Execution information for the successfully completed
write receive job.
ERROR Error display if an error occurred during the function.
STATUS Status display for detailed information about the status
of a block or about an error.
RD_1 Information on the target data area within the local
CPU
LEN Length of received data area
(S7-300 / S7-400)
20982954_SIMATIC_Comm_DOKU_v10_e
4 Compendium / Glossary
often referred to as OSI Layer Model. Each layer has the task to take over
20982954_SIMATIC_Comm_DOKU_v10_e
Table 4-1
Layer Description Explanation
7 Application Layer Here the network-based services are available
for the user’s application.
6 Presentation Layer The structures of the user data are converted
here before being transferred into the application
layer.
5 Session Layer The defined interface for establishing and remov-
ing sessions.
4 Transport Layer Error-free and logical channels for transferring
data are made available here.
3 Network Layer This layer transports data from their source to
their destination and possibly defines the route of
the data.
2 Data Link Layer The data formats for the data transfer are deter-
mined here. In addition, the access type to the
network is defined here. This is divided in MAC
(Medium Access Control Layer) and LLC (Logical
Link Control).
TCP/IP
The ARPANET, forefather of the TCP/IP protocol, was first deployed in
1969, long before the Ethernet idea was born. The development of the
modern TCP began in 1976 until it assumed its present character with the
assignment of the RFC 793 in 1981.
The TCP/IP protocol family on Ethernet can be structurally described as fol-
lows:
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Figure 4-1:
Structure of the TCP/IP
Table 4-2
Layer Description
Application Layer The top layer of the TCP/IP layer model is called application layer. This
layer offers a number of application protocols which many applications
are based on. These application protocols are based either on UDP or
TCP and some even on both of them. One of these supplements to the
TCP protocol is RFC 1006 “ISO Transport Services on top of the TCP“.
Transport Layer The transport layer is based on the internet layer. It forms the actual
data interface for applications or protocols which are based on TCP/IP.
This layer is mainly divided into two large, equal blocks:
• The UDP (User Datagram Protocol) which functions as a datagram
interface and transmits encapsulated data via a not
acknowledged, connectionless network service.
• The (Transmission Control Protocol), an acknowledged,
connection-oriented protocol transmits data in a byte flow.
Internet Layer The internet layer is based on the physical layer and can be compared
with the network layer of the ISO-OSI layer model. The function of IP
(Internet Protocol) is to transfer data safely from one network to an-
other until the destination is reached. This transmission is independent
of the selected path and of the used network. Besides the Internet Pro-
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Acknowledgement mechanism
An acknowledgement mechanism is an implemented or systematic func-
tionality acknowledging received data flows or messages with a short in-
formation, e.g. in terms of completeness, to the sender.
Baud rate
The baud rate refers to the speed of data exchange between different sta-
tions. This transmission speed is measured in bits/s or bauds.
Bus profile
The bus profile is a series of parameters which are used to define specific
system properties. For example, the reaction times of the addressed part-
ners, the number of repetitions for messages and the like are specified
Client
A client is a device or a general object using the service of another station,
often of a server.
Connection types
• Static connections
Static connections are connections configured within STEP 7 and actively
connected without program calls, by means of the communication modules.
• Dynamic connections
Dynamic connections are connections which are exclusively connected and
possibly disconnected by program calls .
CP
The Communication Processor is a module dealing exclusively with com-
munication tasks and connecting a station to a communication system.
CSMA
The term CSMA (Carrier Sense Multiple Access) is referred to an acciden-
tal access procedure to a mutual bus line. When a station wants to send,
the bus line is to be checked as to whether it is blocked by another station.
If the line is free, the station will start to send, otherwise the line bid will be
Copyright © Siemens AG 2005 All rights reserved
deferred for a certain time and the station starts a new attempt later on.
20982954_SIMATIC_Comm_DOKU_v10_e
(Multiple Access).
Datagram
A datagram is a completed data package for the transmission via an IP
network. A data package mostly consists of a header and the data of the
above transport layer of the ISO reference model in the user data area.
Data consistency
The size of a data area which cannot simultaneously be changed by com-
peting processes is referred to as a "consistent data area". Hence, a data
area larger than the consistent data area could be falsified as a whole.
Deterministics
The term deterministics describes the degree of freedom within a closed
system. With regard to PROFIBUS it defines the ability to predict when a
specific station will regain the right to send, thus being ready for data
transmission.
Communication method
• Client/Client communication
A Client/Client communication is an active communication of two active sta-
tions with each other. In this connection, both stations are able to send and
to receive data.
• Client/Server communication
MAP
MAP (Manufacturing Automation Protocol) is a network protocol which is
used for the automation and production systems in the automotive industry
(GM, Opel).
Master
As an active station in a network, the master is able to send data without
being externally triggered by other stations of the network or to poll cycli-
cally data from other stations, usually slaves.
Master-Slave systems:
In a Master-Slave system, one or several masters are cyclically connected
to the slaves allocated to them. In case of Master-Slave systems with dif-
ferent priority classes, the master of lower priority can access the slaves of
Copyright © Siemens AG 2005 All rights reserved
masters with a higher priority. However, the master cannot own his slave as
20982954_SIMATIC_Comm_DOKU_v10_e
MPI bus
The MPI bus is a subtype of the widely used PROFIBUS. Both share physi-
cally the same medium (RS 485). With respect to protocols both systems,
MPI and PROFIBUS, are closely related to each other. Both systems can
also be operated on one bus. However, within the MPI protocol some modi-
fications have been carried out to keep the bus as simple as possible for its
actual function as programming bus. Contrary to the PROFIBUS, the MPI
bus is dependent on the potential, thus considerably limiting its spatial ex-
tension.
Multicast / Broadcast
Multicast / broadcast are services sending data on an unacknowledged ba-
sis to several or all listening stations. Both services differ by:
Table 4-3
Service Multicast Broadcast
Criterion
Receiver A group of stations defined in a All stations at the bus
multicast group
Performance of the Can be used either sending or Only sending
SIMATIC receiving
PDU
PDU = Protocol Data Unit (OSI). The data package which is transferred via
a network.
Performance
Performance is a standard for the performance of a completed system or a
data transfer.
PPI bus
Like the MPI bus, the PPI bus (Peer to Peer Interface) is designed as a
programming bus. But unlike the MPI bus, the PPI bus is not designed for
lateral communication of data, among other things, this is caused by the
partially interrupted transfer of the individual messages.
• Asynchronous
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e
Protocol
A protocol is a precise down-to-the-bit agreement between communication
partners required to perform a specific communication service. The protocol
defines the content structure of the data traffic on the physical line and de-
fines, for example, the operating mode, connection setup procedure, data
security or the transfer speed.
Procedure
A procedure is generally a process. It is often based on a specified protocol
and uses coordinately some of the services specified therewith to facilitate
the communication flow.
Routing
The term "routing" usually refers to the establishment of a communication
path from A to B. In the context of automation and IT engineering, the term
"routing" implies the provision of a communication path for any type of data
packages to be transmitted (routed) from station A to station B across the
boundaries of different networks. However, this does not ensure that the
“shortest” path will always be selected, for the data, but, as far as possible,
the fastest path.
Server
A server is a device or generally an object offering its services to other de-
vices or objects for utilization.
Services
Options for data exchange (services) offered by a communication protocol.
Services are used as an interface for the used layer of the ISO reference
model.
Slave
Slaves are passive stations which are configured and polled by an active
station, a master. Slaves can be either “stupid” or “intelligent“ modules.
Station
A station is a bus station identified at the appropriate bus by a physical ad-
dress.
WAN
WAN = Wide Area Network. These are large-surface data networks ex-
ceeding an individual, closely limited place.
Copyright © Siemens AG 2005 All rights reserved
20982954_SIMATIC_Comm_DOKU_v10_e