Sie sind auf Seite 1von 33

SINEC

Configuring the S7 Mode with COML S7

Volume 1 of 1

1 Overview of S7 Communication

2 The COML S7 Program

3 Configuration

Glossary

C79000-G8976-C074 Release 01

SINEC is a trademark of Siemens


Siemens Aktiengesellschaft
Wir haben den Inhalt der Druckschrift auf Überein- Technische Änderungen vorbehalten.
stimmung mit der beschriebenen Hard- und Software Weitergabe sowie Vervielfältigung dieser Unterlage,
geprüft. Dennoch können Abweichungen nicht aus- Verwertung und Mitteilung ihres Inhalts nicht gestattet,
geschlossen werden, so daß wir für die vollständige soweit nicht ausdrücklich zugestanden. Zuwiderhand-
Übereinstimmung keine Gewähr übernehmen. Die lungen verpflichten zu Schadenersatz. Alle Rechte
Angaben in der Druckschrift werden jedoch regelmä- vorbehalten, insbesondere für den Fall der Patentertei-
ßig überprüft. Notwendige Korrekturen sind in den lung oder GM-Eintragung.
nachfolgenden Auflagen enthalten. Für Verbesse-
rungsvorschläge sind wir dankbar. Copyright © Siemens AG 1996
All Rights Reserved

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

Siemens Aktiengesellschaft Elektronikwerk Karlsruhe


Printed in the Federal Republic of Germany
SINEC
Configuring the S7 Mode with COML S7

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.

Personnel qualification requirements

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;

− First Aid qualification.


B8976087/01 Configuring the S7 Mode with COML S7

Introduction

This description is intended for users and programmers of SINEC S7 communications products.

The manual consists of two parts:


➢ An overview of S7 communication
and
➢ the description of the COML S7 program.

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

2 The COML S7 Program 13


2.1 Range of Functions 14
2.2 Overview of the Complete Configuration 15

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

This chapter provides you with an overview of the following:


➢ How the S7 protocol functions
➢ The client server model
➢ The basic principles such as Request, Confirmation, Indication and Response
➢ The models, objects and services

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

1.1 The S7 Protocol

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

1.2 Basic Principles of the S7 Protocol

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.

In terms of communication, a client is a service requester that uses the


functions of a user process on a (remote) partner station.

A server is a service provider that makes its functions (objects) available


to the client.

A device integrated in the network generally provides both client and


server functions. “Upwards” the device provides services for clients and
“downwards” it delegates its tasks and therefore becomes a client.

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

Client Communications Server


System

Request
Indication

Response
Confirmation

Unconfirmed Services

Client Communications
Server
System

Request
Indication

Figure 1.1 Model for Data Exchange

8
B8976087/01 Configuring the S7 Mode with COML S7

1.3 Virtual Field Device - VFD

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

Figure 1.2 The VFD Model

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.

Physical Device/Network Station

VFD 1 List of S7 connections

S7 connection

S7 connection

S7 connection

VFD 2

Figure 1.3 Assignment of S7 Connections to VFDs

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”.

Application 1 Application 2 Application 3

VFD 1 VFD 2 VFD 3 VFD 4

C1 C2 C3 C4 C5 C6 C7 C8

S7 connection list S7 connection list

CP 1 CP 2

Figure 1.4 S7 Connection List Assignment When an Application Logs On at VFD 1 on CP 1

11
Configuring the S7 Mode with COML S7 B8976087/01

NOTES

12
B8976087/01 Configuring the S7 Mode with COML S7

2 The COML S7 Program

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

2.1 Range of Functions

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

2.2 Overview of the Complete Configuration

The The following overview represents the entire sequence of configuration. It


Configuration starts with the setting of the bus parameters and is completed after a bi-
Sequence nary database has been created and S7 mode has been started. When
operating on the SINEC H1 network, the bus parameters do not need to
be set.

1. Set the bus parameters


(only for the SINEC L2
network)
SINEC

2. Start the COML S7


program

SINEC Setup

3. Create the binary database


for the S7 client

COML S7

4. Startup

S7 mode

Figure 2.1 Overview of the Configuration Sequence for 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

This chapter explains what you have to do during configuration.

The individual configuration steps are explained in detail.

17
Configuring the S7 Mode with COML S7 B8976087/01

3.1 Configuration Steps

Overview Follow the steps outlined below to create an S7 configuration:

Configuration Steps Which Tool?

1. Set the bus parameters Handled outside COML S7, and only
for SINEC L2.

2. Start the COML S7 program SINEC Setup

3. Open a database Menu option File, Open DB


(DB in text or binary format)

4. Configure a text database Main dialog box of COML S7

5. Generate a binary database Menu option


File, Generate Binary DB As

18
B8976087/01 Configuring the S7 Mode with COML S7

Significance of The outlined configuration steps achieve the following:


the Steps
1. Set the bus parameters
For further information, refer to Section 3.2 “Setting Bus Parameters“
on Page 20. This information is only relevant for SINEC L2.

2. Start the COML S7 program


The COML S7 program is started using SINEC Setup.
For further information, refer to Section 3.3 “Starting the COML S7
Program“ on Page 21.

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.

4. Configure a text database


Configuring a text database specifies the S7 connection parameters.
With each text database, the corresponding VFD is also specified.
For further information refer to Section 3.5 “Configuring a Text Data-
base“ on Page 25.

5. Generate a binary database


The database created in the text format is used to generate a data-
base in the binary format. This binary database is accessed during
startup.
For further information, refer to Section 3.6 “Generating a Binary
Database“ on Page 26.

19
Configuring the S7 Mode with COML S7 B8976087/01

3.2 Setting Bus Parameters

1. Set the bus parameters

2. Start the COML S7 program

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.

☞ When operating the S7 protocol parallel to other SINEC L2 protocols,


for example the DP protocol, make sure that the configuration data
are compatible.

20
B8976087/01 Configuring the S7 Mode with COML S7

3.3 Starting the COML S7 Program

1. Set the bus parameters

2. Start the COML S7 program

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.

Menu Options Meaning


File New Creates a new database in the text format.
Open DB Opens an existing text or binary database in
the text format.
Save Text DB Saves an open database (text format) in text
format.
Save Text DB As... Saves an open database (text format) in text
format under a different name.
Generate Binary Saves an open database (text format) in the
DB As... binary format.
Print Documenta- Prints the open database (text format) in text
tion... format for documentation.
Exit Exits the COML S7 program.
Help Index Lists all the help topics in the index.
First Steps Displays brief instructions about the functions
of SINEC COML S7 and how to work with it.
How to Use Help Displays instructions about using the help
system.
Information Opens a window with general information
about the SINEC COML S7 program.

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

3.4 Opening a Database

1. Start the COML S7 program

See menu option:


2. Open a database File,
Open DB

3. Configure a text database

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.

If you want to configure a new database, skip this section “Opening a


Database“. When the main window appears, a new database is always
created in text format.

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.

Opening a Open an existing database as follows:


Database
1. Select the menu option File, Open DB.
2. Select the format of the database (generally a text database).
3. Select the database you require from those displayed for selection.

24
B8976087/01 Configuring the S7 Mode with COML S7

3.5 Configuring a Text Database

2. Open a database

3. Configure a text database

4. Generate a binary 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

3.6 Generating a Binary Database

3. Configure a text database

See menu option:


4. Generate a binary database
File,
Generate Binary DB As

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.

CP Communications Processor - module for communication tasks.

DP Distributed Peripherals (I/Os) - input or output modules that are used in a


distributed configuration at a distance from the CPU. The programmable
logic controller and the distributed I/Os are connected via the SINEC L2
bus system with the PROFIBUS DIN E 19245 Part 3 protocol.

Frame A message from one PROFIBUS station to another.

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.

SAPI Simple Application Programmers Interface - simple programming inter-


face for communications protocols on programming devices and personal
computers.

Services Services provided by a communication protocol.

SINEC Siemens Network and Communication. Product name for Siemens net-
works and network components.

SINEC L2 SINEC bus system for industrial applications based on PROFIBUS.

Station A station is identified by an -> L2 address in the -> SINEC L2 network.

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.

S7 SIMATIC S7 is a programmable logic controller from Siemens AG.


TSAP Transport Service Access Point - a layer 4 service access point (address).

VFD A VFD (Virtual Field Device) is a virtualized form of a real programmable


logic controller with the aim of providing a uniform view of any device.

1
Glossary

NOTES
T

Das könnte Ihnen auch gefallen