Beruflich Dokumente
Kultur Dokumente
Volume 1 of 1
1 Overview of S7 Communication
3 Configuration
Glossary
C79000-G8976-C074 Release 01
We have checked the contents of this manual for The reproduction, transmission or use of this docu-
agreement with the hardware described. Since devia- ment or its contents is not permitted without express
tions cannot be precluded entirely, we cannot guaran- written authority. Offenders will be liable for damages.
tee full agreement. However, the data in this manual All rights, including rights created by patent grant or
are reviewed regularly and any necessary corrections registration of a utility or design, are reserved.
included in subsequent editions. Suggestions for
improvement are welcome. Copyright © Siemens AG 1996
All Rights Reserved
Technical data subject to change.
Nous avons vérifié la conformité du contenu du pré- Toute communication ou reproduction de ce support
sent manuel avec le matériel et le logiciel qui y sont d'informations, toute exploitation ou communication de
décrits. Or, des divergences n'étant pas exclues, son contenu sont interdites, sauf autorisation ex-
nous ne pouvons pas nous porter garants pour la presse. Tout manquement à cette règle est illicite et
conformité intégrale. Si l'usage du manuel devait expose son auteur au versement de dommages et
révéler des erreurs, nous en tiendrons compte et intérêts. Tous nos droits sont réservés, notamment
apporterons les corrections nécessaires dès la pro- pour le cas de la délivrance d'un brevet ou celui de
chaine édition. Veuillez nous faire part de vos sug- l'enregistrement d'un modèle d'utilité.
gestions.
Nous nous réservons le droit de modifier les caracté- Copyright © Siemens AG 1996
ristiques techniques. All Rights Reserved
Description C79000-B8976-C087/01
Note
We would point out that the contents of this product documentation shall not become a part of or modify any prior or existing
agreement, commitment or legal relationship. The Purchase Agreement contains the complete and exclusive obligations of
Siemens. Any statements contained in this documentation do not create new warranties or restrict the existing warranty.
We would further point out that, for reasons of clarity, these operating instructions cannot deal with every possible problem
arising from the use of this device. Should you require further information or if any special problems arise which are not
sufficiently dealt with in the operating instructions, please contact your local Siemens representative.
General
This device is electrically operated. In operation, certain parts of this device carry a dangerously high
voltage.
WARNING !
Failure to heed warnings may result in serious physical injury and/or material damage.
!
Only appropriately qualified personnel may operate this equipment or work in its vicinity. Personnel must be
thoroughly familiar with all warnings and maintenance measures in accordance with these operating
instructions.
Correct and safe operation of this equipment requires proper transport, storage and assembly as well as
careful operator control and maintenance.
Qualified personnel as referred to in the operating instructions or in the warning notes are defined as persons who are familiar
with the installation, assembly, startup and operation of this product and who posses the relevant qualifications for their work,
e.g.:
− Training in or authorization for connecting up, grounding or labelling circuits and devices or systems in accordance with
current standards in safety technology;
− Training in or authorization for the maintenance and use of suitable safety equipment in accordance with current standards in
safety technology;
Introduction
This description is intended for users and programmers of SINEC S7 communications products.
Users and programmers will find the basic principles of the S7 communications protocol ex-
plained in Chapter 1 along with the terminology required to understand the basics of S7 communi-
cation.
Users of the communication will find the procedures for configuring the basic data for communi-
cation from Chapter 2 onwards.
Programmers of the S7 communications interface will find a detailed interface description in the
“S7 Programming Interface” manual.
In addition to this description, the user also has an integrated help system available when configur-
ing with the “COML S7“ program. This provides you with a description of every parameter and
every button in the dialogs.
1
Configuring the S7 Mode with COML S7 B8976087/01
NOTES
2
B8976087/01 Configuring the S7 Mode with COML S7
1 Overview of S7 Communication 5
1.1 The S7 Protocol 6
1.2 Basic Principles of the S7 Protocol 7
1.3 Virtual Field Device - VFD 9
1.4 S7 Connections 10
3 Configuration 17
3.1 Configuration Steps 18
3.2 Setting Bus Parameters 20
3.3 Starting the COML S7 Program 21
3.4 Opening a Database 24
3.5 Configuring a Text Database 25
3.6 Generating a Binary Database 26
Glossary
3
Configuring the S7 Mode with COML S7 B8976087/01
NOTES
4
B8976087/01 Configuring the S7 Mode with COML S7
1 Overview of S7 Communication
At the end of this chapter you will be familiar with the following:
➢ The various objects
➢ The terminology and relationships that will allow you to understand the principles of S7
communication and the SAPI-S7 programming interface.
5
Configuring the S7 Mode with COML S7 B8976087/01
The Tasks of a The exchange of information between two or more communications part-
Protocol ners is only possible when all the partners involved speak the same
“language”, in other words use the same communications protocol.
Protocols are independent of the user programs running on a personal
computer in terms of their behavior or internal implementations on specific
devices. You simply define language elements, such as objects or serv-
ices that are permitted on the communications interface.
The S7 Protocol The components of the new S7 programmable logic controller communi-
cate using the S7 protocol. This achieves the following:
➢ SIMATIC-specific needs are met ideally,
➢ a simple and low cost application is possible,
➢ a higher data throughput is achieved with less load on the processor,
➢ for the first time communication is possible in the lower performance
range.
6
B8976087/01 Configuring the S7 Mode with COML S7
The Client-Server The systems at the various levels of a manufacturing plant are “experts” in
Model certain areas and for certain tasks. In a communications network, this
leads to a hierarchical arrangement of the devices. Components at one
level provide services for the components of the next higher level.
Service Primitives Communication between two devices in the system is based on the follow-
According to ing service primitives at the access points between the layers:
ISO/OSI
➢ Request - The client sends a job.
➢ Indication - The job arrives at the server.
➢ Response - The server sends a reply.
➢ Confirmation - The reply arrives at the client.
7
Configuring the S7 Mode with COML S7 B8976087/01
Confirmed and A distinction is made between two types of services (see also
Unconfirmed Figure 1.1):
Services
➢ Confirmed services
and
➢ unconfirmed services.
With services of the “confirmed” type, the client sends the job and the
server confirms that the job has been performed using an acknowledg-
ment.
With services of the “unconfirmed” type, there is no confirmation that the
job has been performed.
Confirmed Services
Request
Indication
Response
Confirmation
Unconfirmed Services
Client Communications
Server
System
Request
Indication
8
B8976087/01 Configuring the S7 Mode with COML S7
What is a VFD? A VFD (Virtual Field Device) is a virtualized representation of a real pro-
grammable logic controller which is intended to provide a uniform view of
any device. The specific characteristics of a device are disguised. A
physical device can also contain several VFDs (Figure 1.2).
Physical device
VFD 1 VFD 2
A VFD contains all the objects and their descriptions that can be used with
the services available to a communications user. It contains information
about its characteristics and its status.
In the COML S7 program, a VFD is identified unequivocally by its “VFD
name”.
9
Configuring the S7 Mode with COML S7 B8976087/01
1.4 S7 Connections
Configuration Data For each S7 connection, information must be provided about the follow-
ing:
➢ The name of the S7 connection (identified uniquely by the relation-
ship).
➢ The addressing (addresses of the local and remote network stations).
➢ The assigned VFD. If more than one VFD exists, an entry specifies
which VFD should be addressed (Figure 1.3).
The configured S7 connections are grouped together in a list of S7 Con-
nections.
S7 connection
S7 connection
S7 connection
VFD 2
10
B8976087/01 Configuring the S7 Mode with COML S7
Relationship Be- An application can log on at several VFDs on one or more CPs. Multi-CP
tween VFDs and and multi-user operation is, however, only possible when a VFD can be
the S7 Connection assigned unequivocally to an application after the logon (1:n assignment).
List When the application logs on at the CP and the selected VFD, the con-
nections assigned to the VFD during configuration are available from the
S7 connection list of the CP. For example, in the following diagram,
communication is possible on connections “C1”, “C2” and “C3” after a
logon at “CP 1” and “VFD 1”.
C1 C2 C3 C4 C5 C6 C7 C8
CP 1 CP 2
11
Configuring the S7 Mode with COML S7 B8976087/01
NOTES
12
B8976087/01 Configuring the S7 Mode with COML S7
The COML S7 is a tool that allows you to establish the conditions required for communication
between SIMATIC S7 system components and PC applications. The program is integrated in
SINEC Setup. Using the Setup program, you configure the basic connection data that is required
when the S7 programming interface (SAPI-S7) is started up.
13
Configuring the S7 Mode with COML S7 B8976087/01
COML S7 Using the “COML S7“ program, you configure the basic data for the SAPI-
S7 programming interface for communication with SIMATIC S7 system
components. This program provides a convenient user interface for con-
figuration under Windows.
Databases There are two data storage formats for the configured variables:
➢ The database in text format
and
➢ The database in binary format
Database in the The database in text format (standard extension “ .txt ”) is the working
Text Format data storage of the COML S7 program during configuration. When this is
complete and does not contain any contradictions, the database can be
generated in binary format.
The database in text format can be printed out for documentation pur-
poses.
Database in the The database in binary format (standard extension “ .ldb ”) is used when
Binary Format the SAPI-S7 interface is initialized.
SINEC Setup The name of the database in binary format is specified in the “SINEC
Setup” installation program.
14
B8976087/01 Configuring the S7 Mode with COML S7
SINEC Setup
COML S7
4. Startup
S7 mode
15
Configuring the S7 Mode with COML S7 B8976087/01
NOTES
16
B8976087/01 Configuring the S7 Mode with COML S7
3 Configuration
17
Configuring the S7 Mode with COML S7 B8976087/01
1. Set the bus parameters Handled outside COML S7, and only
for SINEC L2.
18
B8976087/01 Configuring the S7 Mode with COML S7
3. Open a database
After starting the COML S7 program, a new database is created in
the text format. If you want to open an existing database that you
saved earlier, you must use the menu option “Open DB”.
For further information refer to Section 3.4 “Opening a Database“ on
Page 24.
19
Configuring the S7 Mode with COML S7 B8976087/01
Aims and Uses You first set the bus parameters. This setting specifies the way in which
data is transmitted on SINEC L2.
Setting Bus The bus parameters are set outside the COML S7 program.
Parameters
☞ Please note that the bus parameter settings must match the settings
of the other stations on the SINEC L2 network.
20
B8976087/01 Configuring the S7 Mode with COML S7
3. Open a database
Aims and Uses The COML S7 program is used to create a database that then forms the
basis for communication.
Startup with The COML S7 program is a Windows program and is started using
SINEC Setup SINEC Setup. Working with SINEC Setup is described in the accompany-
ing installation manual.
Main Window
21
Configuring the S7 Mode with COML S7 B8976087/01
The main window of the COML S7 program appears after the logo win-
dow. All the parameters required to create a database appear as parame-
ter boxes and they simply need to be entered here.
As soon as you start up, a text database is created.
Figure 3.1 Main Window of the COML S7 Program After Entering Two S7 Connections
22
B8976087/01 Configuring the S7 Mode with COML S7
Menu Options The main window of the COML S7 program contains the two menus “File”
of the COML S7 and “Help”. If you select one of these menus, further menu options are
Program displayed. The following table lists the options available in the two menus.
Using the The integrated help system of the COML S7 program is available at any
Integrated Help time. Use the help system as explained in the following table.
Step Meaning
1 Select a list, a parameter box or a button.
Note:
Clicking a button with the mouse activates the corresponding func-
tion but not the integrated help. To obtain integrated help about a
button, mark the button using the tab key so that an additional
frame is displayed around the button.
2 Then press the “F1“ key.
23
Configuring the S7 Mode with COML S7 B8976087/01
Aims and Uses The basis for communication is a database. You can open an existing text
or binary database to modify the configuration it contains.
Starting a Once you have started the COML S7 program using the setup program
Session you start by configuring a database.
You open existing text or binary databases using the “Open DB” menu
option.
Text and Binary You have the choice of opening a database in the text format (textfile.txt)
Databases or in the binary format (binaryfile.lbd).
If you mark a text database to be opened, this is displayed on the monitor
as a text database.
If you mark a binary database to be opened, this is first converted to a
text database since only this format can be displayed on the screen.
Only a text database is saved. A binary database must always be gen-
erated from a text database.
24
B8976087/01 Configuring the S7 Mode with COML S7
2. Open a database
Aims and Uses The database required for communication contains a number of parame-
ters. The majority of these are set automatically by the COML S7 configu-
ration program. The remaining parameters and, in particular, the parame-
ters for specifying the connection to the communications partner must be
configured.
Procedure You configure the database in the main window of the COML S7 program.
The parameters to be configured are saved in parameter boxes.
Integrated Help The integrated help system provides descriptions of all the parameters
requiring entries. After you click the buttons “Include” or “Change”, the
formal correctness of the parameters is also checked.
25
Configuring the S7 Mode with COML S7 B8976087/01
Aims and Uses For S7 mode, a database is required in binary format. At the end of a
configuration session, the database you opened in the text format must be
converted to the binary format and saved.
Generating a To generate a binary database from the text database, select the menu
Binary Database option File, Generate Binary DB As.
Error Message If the COML S7 program detects an error or an ambiguous entry when
Window generating the binary database, an error message window is displayed. ❑
26
B8976087/01 Configuring the S7 Mode with COML S7
NOTES
27
Glossary
Glossary
Bus Parameters Bus parameters control the data transmission on the bus. Each -> station
on the -> SINEC L2 network must use bus parameters that match those of
other stations.
L2 address The L2 address is a unique identifier for a -> station connected to ->
SINEC L2 (PROFIBUS). The L2 address is transferred in the -> frame to
address a -> station.
PROFIBUS Process Field Bus - a network for the cell and field area in the mid per-
formance range intended primarily for an industrial environment comply-
ing with DIN 19245 Part 1 and Part 2.
Protocol A set of rules governing data transmission. Using these rules, both the
formats of the messages and the data flow during transmission can be
specified.
SINEC Siemens Network and Communication. Product name for Siemens net-
works and network components.
System All the electrical equipment within a system. A system includes, among
other things, programmable logic controllers, devices for operation and
monitoring, bus systems, field devices, actuators, supply lines.
1
Glossary
NOTES
T