s7 communication with simatic net

Upload: sobhan93

Post on 10-Oct-2015

78 views

Category:

Documents


12 download

TRANSCRIPT

  • SIMATICCommunication with SIMATIC

    Manual

    1 Introduction and Basics of Communication

    2 Communication Services

    3 Communication Networks

    4 Communication Functions for S7-300/400

    5 Communication Functions for M7-300/400

    6 Cyclic Communication for S7/M7/C7-300/400

    7 Communication Functions on PCs

    8 Connecting SIMATIC Programming Devices/OPs

    9 Project Engineering and Configuring with STEP 7

    10 Programming Examples

    Appendix

    Glossary

    6ES7 398-8EA00-8BA0 Edition 2

    SIMATIC is a trademark of SiemensSiemens Aktiengesellschaft

  • Wir haben den Inhalt der Druckschrift auf bereinstim-mung mit der beschriebenen Hard- und Software geprft.Dennoch knnen Abweichungen nicht ausgeschlossenwerden, so da wir fr die vollstndige bereinstimmungkeine Gewhr bernehmen. Die Angaben in der Druck-schrift werden jedoch regelmig berprft. NotwendigeKorrekturen sind in den nachfolgenden Auflagen enthalten.Fr Verbesserungsvorschlge sind wir dankbar.

    Technische nderungen vorbehalten.

    Weitergabe sowie Vervielfltigung dieser Unterlage,Verwertung und Mitteilung ihres Inhalts nicht gestattet,soweit nicht ausdrcklich zugestanden. Zuwiderhandlun-gen verpflichten zu Schadenersatz. Alle Rechte vorbehal-ten, insbesondere fr den Fall der Patenterteilung oderGM-Eintragung.

    Copyright Siemens AG 1997All Rights Reserved

    We have checked the contents of this manual for agree-ment with the hardware described. Since deviations cannotbe precluded entirely, we cannot guarantee full agreement.However, the data in this manual are reviewed regularlyand any necessary corrections included in subsequenteditions. Suggestions for improvement are welcome.

    Technical data subject to change.

    The reproduction, transmission or use of this document orits contents are not permitted without express writtenauthority. Offenders will be liable for damages. All rights,including rights created by patent grant or registration of autility or design, are reserved.

    Copyright Siemens AG 1997All Rights Reserved

    Nous avons vrifi la conformit du contenu du prsentmanuel avec le matriel et le logiciel qui y sont dcrits. Or,des divergences n'tant pas exclues, nous ne pouvons pasnous porter garants pour la conformit intgrale. Si l'usagedu manuel devait rvler des erreurs, nous en tiendronscompte et apporterons les corrections ncessaires ds laprochaine dition. Veuillez nous faire part de vos sugges-tions.

    Nous nous rservons le droit de modifier les caractristi-ques techniques.

    Toute communication ou reproduction de ce support d'in-formations, toute exploitation ou communication de soncontenu sont interdites, sauf autorisation expresse. Toutmanquement cette rgle est illicite et expose son auteurau versement de dommages et intrts. Tous nos droitssont rservs, notamment pour le cas de la dlivrance d'unbrevet ou celui de l'enregistrement d'un modle d'utilit.

    Copyright Siemens AG 1997All Rights Reserved

    Siemens Aktiengesellschaft Electronics Factory, KarlsruhePrinted in the Federal Republic of Germany

  • SIMATICCommunication with SIMATIC

    Manual

  • Note

    The contents of this manual shall not become part of or modify any prior or existing agreement, commitment or relationship. TheSales Contract contains the entire obligations of Siemens. The warranty contained in the contract between the parties is the solewarranty of Siemens. Any statements contained herein do not create new warranties or modify the existing warranty.

    For the sake of clarity, this document cannot cover all conceivable cases regarding the operation of this equipment. Should yourequire further information or face special problems that have not been dealt with in sufficient detail in this document, please contactyour local Siemens office.

    General informationThis equipment is driven by electricity. Hazardous voltages are present in this electrical equipment duringoperation.

    WARNING !Non-observance of the safety instructions can result in severe personal injury and/or property damage.Only qualified personnel should work on or around this equipment. These persons must be fully conversantwith all safety instructions and maintenance measures contained herein.

    This equipment will function correctly and safely only if it is transported, stored and installed as intended andoperated and maintained with care.

    Requirements concerning qualified personnel

    For the purpose of this manual and product labels, a "qualified person" is one who is familiar with the installation, assembly, start-upand operation of the equipment. In addition, s/he has the following qualifications:

    Is trained and authorized to energize, de-energize, ground and tag circuits and equipment or systems in accordance with up-to-date established safety practices

    Is trained in the proper care and use of protective equipment in accordance with up-to-date established safety practices.

    !

  • Communication with SIMATICEWA 4NEB 710 6075-02a I

    Preliminary Remarks

    Purpose of thisManual

    This manual provides an overview of communication in SIMATICS7/M7/C7 with the following content:

    Introduction to communication and explanation of terms used. In thisintroduction to the theoretical aspect of communication, you will dis-cover how we define communication for the purpose of this manual.

    Description of the communication services and their software inter-faces to the separate communication partners. In this part of themanual you will find out which communication services you can useon the various communication networks. After reading this chapter,you will be able to select the communication possibilities that aresuitable for your application.

    Establishing communication networks and configuring the communi-cation functions. This manual contains a brief introduction to estab-lishing and configuring communication networks.

    ExamplesProgram examples are provided for the different communicationpossibilities and you will also find out in which software package theyare supplied.

    Readership This manual has been written for planning and project engineers as well asprogrammers who are concerned with planning and configuring communi-cation services for the SIMATIC systems.The manual is equally suited to beginners and communication experts.

  • Communication with SIMATICII EWA 4NEB 710 6075-02a

    Where to Start inthis Manual

    Where can you find the information that you want in this manual?

    You are looking for the followinginformation.....

    .....you can find this information inChapter

    You would like to know more aboutcommunication

    Chapter 1Introduction and Basics of Communi-cation

    You know all about communicationand need to know about the pos-sibilities with SIMATIC

    Chapter 2Communication ServicesChapter 3Communication NetworksChapter 4Communication Functions forS7-300/400Chapter 5Communication Functions forM7-300/400Chapter 6Cyclic Communication forS7/M7/C7-300/400Appendix

    You want to expand an existingnetwork

    Chapter 3Communication NetworksAppendix

    You already have the hardwareand need to know about pro-gramming/configuring or whichsoftware tools will provide the nec-essary support

    Chapter 9Project Engineering and Configuringwith STEP 7

    You are looking for examples Chapter 10Programming Examples

    You need detailed information onthe hardware components or soft-ware

    AppendixSTEP 7 Documentation

    You require information on theperformance features

    Appendix

  • Communication with SIMATICEWA 4NEB 710 6075-02a III

    Finding Your Way Rapid access to specific information is supported in this manual by thefollowing directories:

    A complete list of contents is included at the beginning of this man-ual.

    In each chapter, a heading in the left-hand column on every pageprovides an overview of the contents of the paragraph.

    A glossary follows the appendices, with explanations of importanttechnical terms used in the manual.

    Scope of thisManual

    This manual describes the communication functions that you can programand configure using the following software packages:

    STEP 7, V3.1 upwards NCM S7 for PROFIBUS, V3.1 upwards NCM S7 for Industrial Ethernet, V3.1 upwards

    An extensive overview of all communication functions can be found in theappendix.

  • Communication with SIMATICIV EWA 4NEB 710 6075-02a

    Location in theCommunicationLandscape

    The "Communication with SIMATIC" manual provides an introduction toand overview of the communication possibilities that SIMATIC offers.Comprehensive user documentation is available for SIMATIC describing:

    the hardware configuration and programming of a SIMATIC system.

    Figure 0-1 provides an overview of the SIMATIC documentation land-scape.In these manuals, you will find extensive information on the hardware ofthe communication partners and on configuring and programming. Supportis also available in STEP 7 and NCM S7 via the online help function.

    Program-mingManual

    Manual

    Communicationwith SIMATIC

    System Software forS7-300/400Program Design

    STEP 7 User andReference ManualsM7 Basis Software

    Hardware Manuals- S7-200- S7/M7-300/400- ET 200- SIMATIC NET

    Manual

    ManualManual

    SIMATIC NETManuals forNCM S7 Profibus/Industrial Ethernet

    Figure 0-1Documentation Landscape for SIMATIC

  • Communication with SIMATICEWA 4NEB 710 6075-02a V

    Additional Support Should questions arise concerning the use of the products described in thismanual that are not answered here, please approach your local Siemenscontact partner.In the event of questions or remarks concerning this manual, please com-plete the form at the end of this manual and send it back to the addressprovided. We would also be grateful if you use this opportunity to giveyour personal assessment of the manual in the appropriate section of theform.We offer courses to make starting off with SIMATIC much easier for you.Contact your regional training center or the central training center in90327 Nuremberg, Germany, tel. ++49 911 895 3154.

    Up-to-DateInformation

    Continuously updated information on the SIMATIC products is available:

    in the Internet at http://www.aut.siemens.de/ from fax polling No. ++49 8765-93 02 77 95 00

    In addition, SIMATIC Customer Support provides assistance: in the Internet at

    http://www.aut.siemens.de/support/html_00/index.shtm from the SIMATIC Customer Support Mailbox on the tel. number

    ++49 (911) 895-7100To call the mailbox, use a modem with up to 28.8 kbaud (V.34), andset its parameters as follows:8, N, 1, ANSI, or dial in via ISDN (x.75, 64 Kbit).

    SIMATIC Customer Support can be contacted by telephone on++49 (911) 895-7000 and by fax on ++49 (911) 895-7002. Inquiries canalso be posted in the Internet or in the mailbox.

  • Communication with SIMATICEWA 4NEB 710 6075-02a 1-1

    Contents

    1 Introduction and Basics of Communication ........................................................................1-11.1 Basic Terminology ................................................................................................................1-21.2 Network Topology .................................................................................................................1-51.3 Classification of Networks .....................................................................................................1-81.4 Access Techniques ...............................................................................................................1-91.5 Client/Server Concept.........................................................................................................1-111.6 Links ...................................................................................................................................1-121.6.1 Class of Link ....................................................................................................................1-141.6.2 Link Types .......................................................................................................................1-151.6.3 Link Resources ................................................................................................................1-161.7 ISO Reference Model .........................................................................................................1-171.8 Coupled Networks...............................................................................................................1-211.9 Reliability of Transmission ..................................................................................................1-251.10 Application Areas for the Subnets ..................................................................................... 1-262 Communication Services ......................................................................................................2-12.1 Introduction...........................................................................................................................2-22.2 S7 Functions.........................................................................................................................2-42.3 ISO Transport Services.........................................................................................................2-62.4 ISO-on-TCP Services ...........................................................................................................2-72.5 PROFIBUS-FDL Services.....................................................................................................2-82.6 PROFIBUS-FMS Services ....................................................................................................2-92.7 PROFIBUS-DP Services.....................................................................................................2-102.8 Global Data Communication (GD).......................................................................................2-112.9 AS-i Services......................................................................................................................2-123 Communication Networks.....................................................................................................3-13.1 Overview ..............................................................................................................................3-23.2 Multipoint Interface (MPI)......................................................................................................3-53.3 PROFIBUS ...........................................................................................................................3-73.4 Industrial Ethernet............................................................................................................... 3-123.5 Point-to-Point Link ..............................................................................................................3-143.6 AS-Interface........................................................................................................................3-164 Communication Functions for S7-300/400...........................................................................4-14.1 Introduction...........................................................................................................................4-24.2 Communication SFCs for Non-Configured S7 Links..............................................................4-34.2.1 Communication via MPI Subnets .......................................................................................4-44.2.2 Communication Within an S7 Station.................................................................................4-64.3 Communication SFBs for Configured S7 Links......................................................................4-84.4 SEND/RECEIVE Interface .................................................................................................. 4-134.5 FMS Interface .....................................................................................................................4-154.6 Communication via Point-to-Point Links..............................................................................4-185 Communication Functions for M7-300/400 ..........................................................................5-15.1 Communication Functions for Non-Configured S7 Links .......................................................5-25.2 Communication Functions for Configured S7 Links ...............................................................5-5

  • Communication with SIMATIC1-2 EWA 4NEB 710 6075-02a

    6 Cyclic Communication for S7/M7/C7-300/400 ......................................................................6-16.1 Introduction...........................................................................................................................6-26.2 Global Data Communication (GD).........................................................................................6-36.3 Distributed I/O via PROFIBUS-DP ........................................................................................6-76.4 Distributed I/O via the AS-i bus .............................................................................................6-97 Communication Functions on PCs.......................................................................................7-17.1 Communication Functions for Configured S7 Links (SAPI-S7) ..............................................7-27.2 PC Interface for SEND/RECEIVE .........................................................................................7-58 Connecting SIMATIC Programming Devices/OPs................................................................8-18.1 Programming Device/PC Interfacing for STEP 7 on Subnets ................................................8-28.2 SIMATIC OP Interface to Subnets ........................................................................................8-48.3 TeleService ..........................................................................................................................8-69 Project Engineering and Configuring with STEP 7 .............................................................9-19.1 S7 Project.............................................................................................................................9-29.2 Specifying the Network Configuration ...................................................................................9-39.3 Address Assignment .............................................................................................................9-59.3.1 Address Assignment via MPI .............................................................................................9-59.3.2 Address Assignment via PROFIBUS..................................................................................9-69.3.3 Address Assignment via Ethernet.......................................................................................9-79.4 Link Resources .....................................................................................................................9-89.5 Configuring Links ................................................................................................................9-139.5.1 Special Case of the Point-to-Point Link ............................................................................ 9-169.5.2 Links to Non-S7 Stations..................................................................................................9-1710 Programming Examples .................................................................................................... 10-110.1 Communication with SFCs................................................................................................10-210.2 Communication with SFBs ................................................................................................10-410.3 Communication with FDL between SIMATIC S7s.............................................................. 10-710.4 Communication with FDL - SIMATIC S7 and S5 ...............................................................10-910.5 DP Communication via CPs............................................................................................10-1110.6 Communication with ISO Transport between SIMATIC S7s ............................................ 10-1210.7 Communication with ISO Transport - SIMATIC S7 and S5..............................................10-14

    A Appendix............................................................................................................................... A-1A.1 Communications Matrix....................................................................................................... A-2A.1.1 MPI Subnet ...................................................................................................................... A-3A.1.2 PROFIBUS Subnet........................................................................................................... A-6A.1.3 Industrial Ethernet ............................................................................................................ A-9A.2 Technical Data .................................................................................................................. A-13A.2.1 SIMATIC S7-200 ............................................................................................................ A-13A.2.2 SIMATIC S7-300 ............................................................................................................ A-14A.2.3 SIMATIC S7-400 ............................................................................................................ A-16A.2.4 SIMATIC M7-300/400..................................................................................................... A-18A.3 Performance Data ............................................................................................................. A-19A.3.1 Response Time for Communication SFBs via Configured S7 Links ................................ A-19

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-1

    1 Introduction and Basics of Communication

    Overview In this chapter you will find out what we mean by communication withinthe context of SIMATIC. You will become familiar with the most importantterms and will find out where communication takes place from the view-point of the user.

    Chapter Overview In Section You will find On page1.1 Basic Terminology 1-21.2 Network Topology 1-51.3 Classification of Networks 1-81.4 Access Techniques 1-91.5 Client/Server Concept 1-111.6 Links 1-12

    1.7 ISO Reference Model 1-171.8 Coupled Networks 1-211.9 Reliability of Transmission 1-25

    1.10 Application Areas for the Subnets 1-26

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a1-2

    1.1 Basic Terminology

    Overview The basic terminology and principles of communication that are importantfor information transfer between controllers and between controllers andOPs/PCs will be explained here.

    Communication Communication involves the transmission of data between two communi-cation partners of different types, controlling the communication partnerand querying the operating status of the communication partner. Commu-nication can take place via different communication routes.

    Figure 1-1: Example of Communication Partners in a Subnet

    CommunicationPartner

    A communication partner is a module that is capable of performing com-munication functions, i.e. exchanging data. The physical location of thecommunication partner can either be within the same unit or in anotheritem of equipment. Examples of communication partners are CPUs orFMs.

    Station A station is a device which as a self-contained unit (e.g. programmablecontroller, programming device, operator panel/system, PC or non-Siemens unit) can be connected to one or more subnets.

    Subnet The subnet is the sum total of all physical components that are required inorder to build up a data transmission route as well as the associated com-mon procedures required for transferring data.The interconnections between stations connected to a subnet do not passthrough gateways. The physical entirety of a subnet (MPI, PROFIBUS,Industrial Ethernet) is also designated as a transmission medium.

    CPUCPU

    Station

    Station Module withcommunicationcapability

    Module withcommunicationcapability

    FM

    Subnetwork

    CPUCPU FM

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-3

    Network A network is a unit which comprises one or more interconnected subnetsof the same or different type. It comprises all stations that are able tocommunicate with one another.

    Figure 1-2: Example of a Communication Network

    Link A link is the logical assignment (via configuration) of one communicationpartner to another for the purpose of executing a specific communicationservice. The link is directly assigned to a communication service.The link has two end points which contain the information required foraddressing the communication partner as well as further attributes for es-tablishing the link (see Section 1.6). The communication functions onlyuse the local end point for link reference purposes.

    CommunicationFunctions

    These are the functions offered by a software interface which utilizecommunication services. Communication functions can transfer data be-tween communication partners that have different performance data,control the communication partner (e.g. switch it to the STOP state) orquery its current operating status.

    CommunicationServices andSoftwareInterfaces

    This term describes the communication functions using defined perform-ance features, such as data to be transferred, devices to be controlled,devices to be monitored and programs to be loaded. The communicationservices (simply referred to as services from now on) are offered viasoftware interfaces in the data terminal (e.g. SIMATIC S7 system func-tions). The communication services can be classified with respect to theirperformance in accordance with the ISO reference model (see Section1.7).

    Network

    Subnet 3

    Subnet 2

    Subnet

    1

    Station

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a1-4

    A software interface does not necessarily offer all the communicationfunctions of a service. The communication service can be provided in therespective data terminal (e.g. PLC, PC) using various software interfaces.

    Protocol This is a bit-specific arrangement between two communication partnersfor the purpose of executing a specific communication service. The proto-col defines the structure of the contents of the data traffic on the physicalcable and specifies, for example, the operating mode, procedure for es-tablishing a link, data backup and transmission rate.

    Data Consistency The extent of the data area that cannot be modified by competing proc-esses simultaneously is termed the data consistency. Data areas that arelarger than the data consistency can therefore become inconsistent as awhole. This means that a self-contained data area (larger than the dataconsistency) can comprise new and old consistent data blocks at any onetime.

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-5

    1.2 Network Topology

    Overview The term topology refers to the different structures found within a subnet(e.g. tree, ring).When a number of autonomous automation system components such assensors, actuators or PLCs exchange information, they must be physicallyinterconnected in some form of structure. In this manner they form acommunication network. The network topology is the basic geometricstructure of the network. The communication stations are the nodes of thenetwork. They are linked by junctions. The simplest structure is obtainedwhen the network comprises just two communication stations, i.e. twonodes. This is the simplest structure, known as a point-to-point structure.

    Line The simplest geometrical form is a line structure. It is often called a busstructure, even though a bus does not necessarily have a line structure. Inthis case, all stations on the network only require one interface. They canbe linked with the main line via short tapped lines.Whereas in a point-to-point structure, four nodes for example can com-municate simultaneously in pairs, this is not possible in a line structure. Ithas to be ensured that only one station is able to transmit at a time, duringwhich all other stations are only permitted to listen. This means that rulesare necessary to define when a station has the right to transmit. Bus ac-cess techniques are important here. They are also necessary for the othertopologies described below.

    Station 2 Station 3Station 1

    Figure 1-3: Example of Line Topology

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a1-6

    Ring Certain similarities exist between the line and ring structure. Permission tosend also has to be controlled via bus access techniques in this case. Aring can be constructed in the form of point-to-point links connected inseries. An advantage of this type of ring is that each node can operate asa repeater so that large distances can be covered The disadvantage of thering structure is, however, that failure of a node causes much greaterproblems than in the case of the line structure. The ring structure is oth-erwise more similar to the line structure in terms of its characteristics.

    Station 2 Station 3Station 1

    Station 5 Station 4Station 6

    Figure 1-4: Example of Ring Topology

    Star The next type of structure that deserves a mention is the star structure.This structure has an extremely important node at the star point. It controlsthe entire communication and if it fails, the entire network usually fails withit.

    Station 2 Station 3Station 1

    = Star coupler*

    *

    Figure 1-5: Example of Star Topology

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-7

    Tree Finally, the tree structure is also used in automation engineering. It canalso be interpreted as a chain of a number of line structures of differentlengths and also of different types. In this case, the elements that are usedto connect the separate lines have a special significance.

    Station 2

    Station 3

    Station 1

    R

    R = RepeaterStation 5Station 4

    R

    Figure 1-6: Example of Tree Topology

    These elements can be simple repeaters for cases in which the connectedsections are of the same type, but they can also be converters (routers,bridges, gateways) for cases in which the sections to be connected are ofdifferent types.

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a1-8

    1.3 Classification of Networks

    Overview Three different classes of network are specified in terms of their geo-graphical coverage. These are the LAN (local area network), MAN(metropolitan area network) and WAN (wide area network). It is, however,not always possible to categorize a network precisely because theboundaries tend to overlap. Limits can be defined for the distance coveredby the network as follows:LAN < 5 kmMAN < 25 kmWAN > 25 km.

    Topology of theNetworks

    Statements can be made about the topologies implemented on the basisof the distances to be covered. The topology of a WAN is dictated by geo-graphical conditions (e.g. location of the major population centers and theexpected communication traffic between the nodes of the network). Forreasons of economy (the economic use of cables), irregular webs in a treestructure usually result. The topology of a LAN, however, is more clearlystructured because the overall functional capability is much more impor-tant than the economic use of cables. Line, ring and star structures aretypical for LANs.Apart from LANs and WANs, FANs (field area networks) are also beingintroduced. The FAN is used in process automation for communication atthe field level in the process environment, whereas the MAN and WAN areresponsible for communication within and between the higher levels of thehierarchy (works, production and company management levels). This isparticularly important when different production centers, sales companies,etc. form a single administrative unit but are separated by large distances.

    TransmissionMedium

    The choice of physical transmission medium depends mainly on the re-quired length of the network, the degree of intrinsic safety required and thetransmission rate. The commonly used transmission mediums, listed inascending order of complexity and performance, are as follows:

    2-core, not twisted, not shielded (e.g. AS-i bus) 2-core, twisted, not shielded 2-core, twisted, shielded (e.g. PROFIBUS) Coaxial cable (e.g. Industrial Ethernet) Fiber-optic cable (PROFIBUS / Industrial Ethernet)

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-9

    1.4 Access Techniques

    Overview Since only one telegram can be transmitted at any one time on a bus,there has to be a system to determine which bus station is permitted totransmit on the bus. The number of "listening" telegram receivers is notimportant. Access to the bus is controlled by the bus access technique.There are different categories of bus access techniques: central and de-centralized, whereby the latter is subdivided into deterministic and sto-chastic (or random) techniques:

    Access technique

    Central Decentral

    Deterministic Stochastic

    Figure 1-7: Bus Access Techniques

    Master/Slave A typical central technique is the master/slave technique. The master di-rects the entire bus traffic. It sends data to the slaves (polling) and givesthe slaves the command to send. Direct communication between slaves isusually not possible. The advantage of master/slave techniques is thesimple and therefore efficient bus control. This is why they are often usedin field buses such as PROFIBUS-DP.

    Figure 1-8: Example of a Master/Slave Configuration

    Master/slave assignment

    Bus system

    SlaveSlave Slave

    Master

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a1-10

    Token Passing Token passing is a decentralized, deterministic technique. In this case, atoken (fixed bit pattern) travels through the communication network as asign of permission to send. The station in possession of the token is per-mitted to send, but must pass the token on within a specified time limit.This guarantees that a maximum token circulation time is not exceeded. Ifthis technique is used in a line topology, the network is often described asa token bus. The token is passed from station to station in a logical ring inaccordance with certain rules. If the network is physically in the form of aring, it is called a token ring.If several masters and slaves are configured in a communication network,only the masters receive the token.

    CSMA/CD The most important stochastic (random) access technique is CSMA/CD(carrier sense multiple access with collision detection, standardized inIEEE 802.3). In this case, any station is permitted to send at any time,provided that no other station is transmitting. Conflict occurs, however, asa result of signal runtimes when two stations start to transmit at the sametime because the bus was free. In this case, both stations detect the colli-sion by monitoring, stop transmitting and try again after a random waitingtime. Buses that use CSMA/CD (e.g. Industrial Ethernet) usually operate ata transmission rate of 10 Mbits/s.

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-11

    1.5 Client/Server Concept

    Overview Client/server concepts are based on the principle of separating the func-tions of using (client) and managing (server) data. The aim of separatingthese functions is higher productivity in user program development as aresult of clear task definition, easier integration of different applicationsand better access to data from a large number of work stations. Mail serv-ers and communication servers are available for the purpose of properlyorganizing efficient access to services for a large number of users(clients).

    Server It is the responsibility of the server to store and manage the data and toensure that special functions are available (e.g. communication services).The communication functions of the server do not have to execute in theuser program, but can also be implemented in the operating system (e.g.order confirmation PUT/GET services).

    Client The responsibility of the client is to make it easier for the end user to beable to access the overall system without the need for the detailed distri-bution of data and functions to be visible.

    Model In the field of automation applications, the interactions between applica-tions and the services provided by the communication system can often bedescribed in the form of the client/server model. In this case, the applica-tion that behaves like a client (e.g. PUT/GET) requests a service and theserver (e.g. programmable controller) provides the service. Information isusually exchanged via so-called communication objects. There are differ-ent types of communication objects with different attributes (e.g. data type,access right) and available operations. A client executes, for example, the"read" operation on a server object of the "variable" type.

    Note The term server is not a synonym for "slave". The concept of a server isbased on a Layer 7 view and the concept of a slave is based on a Layer 2view. A station that only has the functional scope of a slave is not able tosend on its own initiative. If an event occurs (e.g. transition to the STOPstate), a server, however, is able to send an appropriate signal via the bus.

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a1-12

    1.6 Links

    Introduction A link is the logical assignment of one communication partner to anotherfor the purpose of executing a specific communication service. The link isdirectly assigned to a communication service.Each link has two end points (on the associated CPU or CP) which con-tain the information required for addressing the communication partner aswell as further attributes for establishing the link. The communicationfunctions in the user program only reference the local end point of thelink.

    S7CPU

    Subnet

    CP

    S7CPU CP

    S7 link

    Communicationsfunction USEND

    Communicationsfunction URCV

    S5CPU

    CP

    Handling blockSEND

    S7CPU

    CP

    Communicationsfunction AG_RECV

    FDLlinkSubnet

    Links reserve link resources for each end point on the modules participat-ing in communication. This therefore affects the signal quantities for links.In the SIMATIC 7 family, links are categorized as follows:

    LinksClass of link Configured

    (via link table)Not configured

    Link connection/disconnection

    Static Dynamic(only M7-300/400)

    Dynamic

    Further details are provided in the subsequent sections.

    Active / Passive To ensure that a link is established properly, it must be passive at oneend point and active at the other.

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-13

    Static Static links are used when sufficient link resources are available in theindividual stations of a system configuration and they do not have to bereleased again. Time-consuming connecting and disconnecting of links donot have to be taken into account on planning either.Static links are established once only and are then permanent.

    Dynamic Dynamic links are used to exchange data in sequence with differentcommunication partners or for the purpose of using existing link resourcesmore efficiently.The actual connecting and disconnecting of links does not take placewhen the station starts up, but only in response to an explicit request fromthe user program.It is therefore essential that the time involved in connecting and discon-necting links is taken into account in the case of time-critical processes.

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a1-14

    1.6.1 Class of Link

    Use Depending on the software interface used, the associated communicationfunctions require either configured or non-configured links (see Chapter2).

    Configured Links This type of link is configured using STEP 7 (in the link table), whereby alocal ID is assigned to the respective link end point. This local ID is re-quired for parameterizing the communication functions. The local ID ref-erences a data area that also contains its own address information andthat of its communication partners.

    Note Communication functions that originate from a SIMATIC OP or PC alsorequire configured links. In this case, however, the links are configuredusing a separate tool (e.g. ProTool or COML). These links also reservelink resources (for S7 functions) on the CPUs.

    Non-ConfiguredLinks

    Non-configured links are not configured via the link table in STEP 7.These links are established implicitly when the communication function iscalled and are removed if necessary when the data has been successfullytransmitted.

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-15

    1.6.2 Link Types

    Definition The link establishes access to the communication service from the soft-ware interface. A link is directly allocated to a communication service. Forthis reason, a corresponding link type exists for each communicationservice.In SIMATIC S7 the link types are allocated to services as follows (seeSection 2.1):

    Service Link TypeS7 functions S7 linkISO transport ISO transport linkISO-on-TCP ISO-on-TCP linkFDL FDL linkFMS FMS linkProtocol drivere.g. RK512

    Point-to-point link

    The appropriate link type can be selected on configuring the links usingSTEP 7.

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a1-16

    1.6.3 Link Resources

    Overview Every link requires link resources on the participating stations for the endpoint or for the transition point (e.g. CP). The number of link resourcesdepends on the type of CPU or CP (see Page 9-13).If all the link resources for a communication partner are reserved, it is notpossible to establish a new link.

    Figure 1-9: S7 Functions via Integrated MPI or viaPROFIBUS/Industrial Ethernet with CP

    CPU

    MPI Industrial EthernetPROFIBUS

    CPFree link resource

    Reserved link resources

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-17

    1.7 ISO Reference Model

    Overview If data is to be transferred between two devices via a common network, itis necessary to define the protocol and the access technique. Other infor-mation concerning, for example, establishing the link also has to be speci-fied. For this reason, a 7-layer model has been defined by the InternationalStandardization Organization (ISO).Layers 1, 2 and 4 are absolutely essential for reliable, adequate commu-nication. Layer 1 defines the physical conditions such as current and volt-age levels. In Layer 2, the access mechanism and address of the stationis defined. This ensures that only one station is able to send data via thenetwork at any given time.Data reliability and consistency are only ensured by the functions of Layer4 (transport layer). Apart from controlling transport, the transport layeralso performs tasks for data flow control, inhibiting and acknowledgement.Links are established for the purpose of implementing these functions.Layer 7, the application layer, contains the communication services (e.g.S7 functions).

    Protocol This is a bit-specific arrangement between two communication partners forthe purpose of executing a specific communication service. The protocoldefines the structure of the contents of the data traffic on the physical ca-ble and specifies, for example, the operating mode, procedure for estab-lishing a link, data checking and transmission rate.

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a1-18

    ISO ReferenceModel

    The ISO reference model defines layers in which the response of thecommunication partners is defined. These layers are arranged one abovethe other whereby Layer 7 is the uppermost layer. The ISO referencemodel will be referred to later in the descriptions of the services. Onlyidentical layers communicate with one another.The way in which the separate layers are implemented in a real case is notspecified by the reference model, but depends on the specific implemen-tation. In the case of PROFIBUS, Layers 3 to 6 are not used in order toobtain high-speed communication with real-time capability and essentialfunctions are integrated in Layers 1, 2 and 7.The specifications for the separate layers are as follows:

    Layer Designation Function Features

    7 Application layer Application functions:Provides application-specific communicationservices

    Communicationservices, e.g.Read/WriteStart/Stop

    6 PresentationlayerData presentation:Converts the standardpresentation format forthe communicationsystem to a device-specific format

    Common language

    5 Session layer Synchronization:Opening, closing andmonitoring a session

    Coordination of thesession

    4 Transport layer Connecting / disconnect-ing links, repeatingpackets, sorting packets,packaging

    Error-free transferof packets

    3 Network layer Addressing other net-works/routing, flow control

    Communicationbetween two sub-nets

    2 Data link layer Access techniques:Data block boundaries,error-free data transfer,error detection, errordetection, error handling

    CRC checkCSMA/CDtoken

    1 Physical layer Physical aspects of datatransfer, transmissionmedium, baudrate,specification of theelectrical, mechanicaland functional parame-ters of the cable/bus

    Coaxial/triaxial ca-ble, fiber-optic ca-ble, 2-wire cable

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-19

    Physical Layer Layer 1: This layer ensures that bits are transferred via the physical medium in theorder in which they are received from the data link layer (Layer 2). Theelectrical and mechanical characteristics as well as the types of transmis-sion are specified here.

    Data Link Layer Layer 2:It is the responsibility of this layer to transfer bit strings between two sys-tems. This also includes detecting and rectifying or reporting transmissionerrors and checking the flow. In local networks, the data link layer alsoguarantees exclusive access to the transfer medium. For this purpose, thelayer is subdivided into two sublayers, medium access control (MAC) andlogic link control (LLC), which are also known as Layer 2a and Layer 2brespectively. The most well-known standards for the media access tech-niques in the MAC sublayer are:IEEE 802.3 (Ethernet, CSMA/CD),IEEE 802.4 (token bus),IEEE 802.5 (token ring).The IEEE 802.2 standard is usually used for the LLC sublayer. As a resultof the special real-time requirements that apply to fieldbus systems, theseaccess techniques are often used in a heavily modified form.

    Network Layer Layer 3:This layer is responsible for transferring data between the data terminals.The data terminals are the sender and receiver of a message that maypass through several transit systems. For this purpose, the network layerhas to organize the routing.

    Transport Layer Layer 4:The transport layer is responsible for providing the user with a reliableend-to-end link. The services provided include establishing a transportlink, transferring data and removing the link. The service user can demanda specific quality of service (QoS). Quality characteristics are, for exam-ple, transmission rate and residual error rate.

    Session Layer Layer 5: The main task of the session layer is to synchronize communication appli-cations. Apart from this, the services of the session layer allow synchroni-zation points to be set within a longer transmission, such that in the eventof interruption of the link, the entire transfer procedure is not repeated, butcan be restarted from a specific synchronization point.

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a1-20

    Presentation Layer Layer 6:Systems of different types usually speak different languages initially ondata transfer. The presentation layer translates the different languages ofthe participants into a uniform language with an abstract syntax. In mostcases, Abstract Syntax Notation one (ASN.19 defined in ISO 8824 is usedand the associated Basic Encoding Rules (BER) are employed.

    Application Layer Layer 7:The application layer comprises the application-specific services of thevarious communication applications. The applications are numerous, so itis difficult to establish uniform standards. The most important standard inautomation is the manufacturing message specification (MMS) which de-scribes the services and protocols of the MAP (manufacturing automationprotocol) application layer. Modern fieldbus systems are strongly orientedtowards MMS with respect to the design of the application layer.The specifications of PROFIBUS are described in detail by Layers 1, 2 and7 of the ISO layer model. All seven layers have not been implemented forthe sake of simplicity. Layers 3 to 5 are "empty".PROFIBUS is a multi-master system. A hybrid bus access method is usedto control bus access, i.e. token passing is used decentrally and the mas-ter/slave principle is used centrally.

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-21

    1.8 Coupled Networks

    Overview In order to guarantee a continuous flow of information between two differ-ent subnets, special coupling elements are required. The subnets to becoupled have usually developed separately over the years and cannot bedirectly coupled because information arriving from subnet A cannot beinterpreted by the protocols of subnet B. An important requirement is thatthe coupled subnets should behave like a single subnet from the viewpointof the user, i.e. that coupling should not have any detrimental effect on thefunctioning of the network. The coupling of subnets is therefore invisible tothe user; s/he is not aware of it and does not have to make any softwaremodifications because of it.Depending on the complexity of the coupling and the disparity between thesubnets to be coupled, either repeaters, bridges, routers or gatewayscan be used as the network coupling elements. They can be mapped ontothe ISO reference model on the basis of their tasks.

    Repeater The repeater copies the information received via the cable to the oppositeside of the coupling and amplifies it in the process. A repeater operatesinvisibly for all layers of the communicating stations, i.e. even the physicallayers of both networks must be identical. Repeaters are often used, not toconnect two subnets of the same type, but to expand or extend an existingsubnet, e.g. a bus system.

    Network

    Subnet

    Repeater

    Station A Station C

    Physical

    Application

    SessionPresentation

    Data link

    Network

    Physical

    Transport

    Application

    SessionPresentation

    Data link

    Network

    Physical

    Transport

    R

    A C

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a1-22

    Bridge Bridges are used to couple subnets that use the same protocols in the datalink layer (Logical Link Control, LLC). The transfer medium and the busaccess techniques (medium access control, MAC) of the subnets to belinked can be different. Bridges are usually used when local networks withdifferent topologies are to be connected or when specific structures haveto be connected to subnets via special applications.The tasks of the bridge are limited in some versions to bus access (MAC).The LLC is not affected by this. This type of bridge is used for subnets thatonly differ with respect to the transfer medium (e.g. 2-core cable and fi-ber-optic cable) and which are otherwise identical.

    Network

    Subnet Subnet

    Bridge

    Station A Station C

    Application

    SessionPresentation

    Data link

    Network

    Physical

    Transport

    Application

    SessionPresentation

    Data link

    Network

    Physical

    Transport

    A C

    Data linkPhysical Physical

    B

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-23

    Router The router is used to connect ISO networks which differ in Layers 1 and 2.The router also determines the optimal communication path for a messagethrough an existing network (routing).The shortest distance or the shortest transmission delay can be used ascriteria for the optimum route. The router performs its task by changing thesource and destination addresses of the network layer for the arriving datapackets before it sends them onwards.Routers have to perform a much more complex task than bridges, so theyhave lower operating speeds.

    Network

    Subnet Subnet

    Router

    Station A Station C

    Application

    SessionPresentation

    Data link

    Network

    Physical

    Transport

    Application

    SessionPresentation

    Data link

    Network

    Physical

    Transport

    A C

    NetworkData link Data link

    Physical Physical

    B

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a1-24

    Gateway Gateways are used to connect networks of differing architectures, i.e. anytwo subnets can be connected. Within the context of the ISO referencemodel, the task of gateways is to convert the protocols of all layers. Agateway also enables an ISO network to be connected to a non-ISO net-work. In this case, one half of the gateway has a different type of structurefrom the 7-layer structure, as shown in the diagram. High costs and lowspeeds are typical characteristics of network connections via gateways.

    Network

    Subnet Subnet

    GatewayStation A Station C

    Application

    SessionPresentation

    Data link

    Network

    Physical

    Transport

    Application

    SessionPresentation

    Data link

    Network

    Physical

    TransportSessionPresentation

    Data link

    Network

    Physical

    TransportSessionPresentation

    Data link

    Network

    Physical

    Transport

    A C

    Application

    G

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-25

    1.9 Reliability of Transmission

    Overview In Layer 1, the bits to be transferred are physically coded to guarantee thebest possible reliability and safe data transfer. When data is received, ithas an associated error probability above Layer 1 as a result of interfer-ence acting on the transfer medium. The terms "bit error rate" and "blockerror probability" can be found in the literature in this context.In Layer 2, coding is performed for data security purposes. A characteristicof a code of this type is the so-called hamming distance (HD). This speci-fies the number of bits that differ between two valid code words, i.e. howmany bits must toggle before another valid code word is produced. Tog-gling of a number of bits up to HD-minus-one is therefore detected as anerror.

    Residual ErrorProbability

    Above Layer 2, a residual error probability remains. It specifies the ratio ofundetected, faulty telegrams to the total number of telegrams received.The residual error probability can therefore be regarded as a measure oftransmission reliability. This depends on the interference on the cable, thephysical coding used (e.g. NRZ, Manchester coding) and the messagecoding (telegram).

    Hamming Distance The hamming distance, therefore, can only be applied as a means forassessing the transmission reliability within limits. If a specific bit errorprobability and a fixed hamming distance are assumed, the residual errorrate increases with size of the telegram. A high reliability can be obtainedif considerable effort is invested in the physical coding, so that the bit errorrate or block error probability is reduced. If a constant hamming distance isassumed, this results in a reduction of the residual error probability. A lowresidual error probability can therefore be assumed with the AS-i bus, de-spite its hamming distance of 2.

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a1-26

    1.10 Application Areas for the Subnets

    Overview SIMATIC offers a range of communication networks to suit different re-quirements (see Chapter 3). These requirements of the automation land-scape can be categorized in the following four automation levels:

    Management level

    Cell level

    Field level

    Actuator/sensorlevel

    Ethernet

    PROFIBUS/MPI

    AS-Interface

    Management Level At the management level, supervisory tasks are processed which affectthe entire works (management functions). These include storing processvalues as well as optimizing and analyzing processing functions as well astheir output in the form of reports. The data required for these reports iscollected from various sites and processed. From the management level,it is also possible to access other sites.The number of stations can exceed 1000.

    Cell Level At the cell level, all automation and optimization functions are processedautonomously. At this cell level, programmable controllers, PCs and hu-man-machine interfaces are connected to each other.

    Field Level The field level is the link between the installations and the programmablecontrollers. The field devices measure, signal and transmit the commandsfrom the cell level to the installations. Small data volumes are usuallytransferred. A hierarchic communication arrangement is typical for thislevel, i.e. several field devices communicate with one master.

  • Introduction and Basics of Communication

    Communication with SIMATICEWA 4NEB 710 6075-02a 1-27

    Actuator/SensorLevel

    At this level, a master communicates with the actuators and sensors thatare connected to a subnet. Its characteristic feature is a fast response timefor a small number of data bits.

  • Communication Services

    Communication with SIMATICEWA 4NEB 710 6075-02a 2-1

    2 Communication Services

    Overview In this Chapter, you will find out the types of communication services thatare available and how they can be categorized in terms of performance.You will become familiar with the software interfaces for communicationservices that exist within SIMATIC.

    Chapter Overview In Section You will find On page2.1 Introduction 2-2

    2.2 S7 Functions 2-42.3 ISO Transport Services 2-62.4 ISO-on-TCP Services 2-72.5 PROFIBUS-FDL Services 2-82.6 PROFIBUS-FMS Services 2-92.7 PROFIBUS-DP Services 2-102.8 Global Data Communication (GD) 2-112.9 AS-i Services 2-12

  • Communication Services

    Communication with SIMATICEWA 4NEB 710 6075-02a2-2

    2.1 Introduction

    Definition A SIMATIC S7 communication service describes communication func-tions using defined performance features, such as data to be transferred,devices to be controlled, devices to be monitored and programs to load.The SIMATIC S7 communication services (simply referred to as servicesfrom now on) are offered via software interfaces in the data terminal (e.g.SIMATIC S7 system functions). A software interface does not necessarilyoffer all the communication functions of a service. Such a service can beprovided in the respective data terminal (e.g. PLC, PC) with differentsoftware interfaces.

    Services andSubnets

    Communication in SIMATIC S7 is based on various subnets on whichvarious services are provided. The following table shows the relationshipbetween services and subnets.

    Services S7 communication functions(S7 functions)

    ISO transportISO-on-TCP

    FDL (SDA)FMSDP GD

    Sub-nets

    IndustrialEthernet

    PROFIBUS MPI

    A summary of the communication services that are used in SIMATIC isgiven below. For information on subnets, see Chapter 3.

    S7 Functions The S7 functions offer services for communication between S7/M7 CPUs,SIMATIC OPs/OSes and PCs. The S7 functions are already integratedinto every SIMATIC S7/M7 system. The S7 functions correspond to aservice of the ISO application layer, so they are independent of the subnetand can be used in all subnets (MPI, PROFIBUS, Industrial Ethernet).

    ISO Transport These functions support error-free transmission of medium data volumes(up to 240 bytes) via open communication on Layer 4 (the transport layerof the ISO reference model) with Industrial Ethernet between SIMATIC S7and SIMATIC S5.

  • Communication Services

    Communication with SIMATICEWA 4NEB 710 6075-02a 2-3

    ISO-on-TCP These functions support error-free transmission of medium data volumes(up to 240 bytes) via open communication with TCP/IP protocol on Layer 4in accordance with the ISO reference model with Industrial Ethernet be-tween SIMATIC S7 and PCs or non-Siemens systems via TCP/IP net-works.The ISO-on-TCP service requires the extended RFC1006 standard.

    FDL (SDA) These functions support the error-free transmission of data from SIMATICS7 to SIMATIC S5.They are optimized for the transmission of medium data volumes (up to240 bytes) via open communication on Layer 2 of the ISO referencemodel, fieldbus data link (FDL) with PROFIBUS.

    FMS PROFIBUS FMS (fieldbus message specification) offers services for thetransmission of structured data (FMS variables).The FMS service can be placed in Layer 7 of the ISO reference model. Itcomplies with the European standard EN 50170 Vol. 2 PROFIBUS andtherefore facilitates open communication between stations on PROFIBUS.

    DP PROFIBUS-DP services facilitate transparent communication with distrib-uted I/O. From the control program, distributed I/O is addressed as if itwas central I/O.This service complies with the European standard EN 50170 Vol. 2PROFIBUS master/slave and therefore facilitates open communication todistributed I/O and field devices.

    GD Global data communication is a simple communication service that isintegrated into the operating system of the S7-300/400 CPUs.GD communication facilitates cyclic data transfer between CPUs via theMPI interface. Cyclic data transfer takes place with the normal processimage.

    AS-Interface These services are provided for cyclic data transmission between a pro-grammable controller, and actuators and sensors at a lower system level.

  • Communication Services

    Communication with SIMATICEWA 4NEB 710 6075-02a2-4

    2.2 S7 Functions

    Overview The S7 functions offer services for communication between S7/M7 CPUs,SIMATIC OPs/OSes and PCs. The S7 functions are already integratedinto every SIMATIC S7/M7 system. The S7 functions correspond to aservice of the Application Layer (Layer 7 of the ISO reference model), sothey are independent of the subnet and can be used in all subnets (MPI,PROFIBUS, Industrial Ethernet).

    Features The S7 functions comprise the following: Complete functions for programming SIMATIC programmable con-

    trollers with STEP 7 (e.g. downloading the hardware configuration,loading STEP 7 programs, online operator control of the SIMATICstations and program testing and diagnostics).

    Writing and reading variables as well as automatic transmission ofdata to the operator control and visualization stations (OPs andOSes) without the need for additional communication functions inthe user program of the communication partner.

    Error-free transfer of an area or subarea of data blocks (up to 64Kbytes), a bit memory area or the process image between SIMATICS7/M7-400 stations. This means that data transfer is only completedwhen the receive function in the communication partner has loadedthe data (BSEND/BRCV).

    High-speed data transfer without checking, independent of the timetaken to process the communication function by the communicationpartner (e.g. operating and status signals). This means that the datacan be overwritten with more up-to-date data at the communicationpartner (USEND/URCV). This is only possible betweenSIMATIC S7/M7-400 stations.

    Program controlled reading and writing of variables without the needfor additional communication functions in the user program of thecommunication partner (PUT/GET).

    Control functions in order to set the CPU of the communication part-ner into the stop state, or to trigger a complete restart or warm re-start.

    Monitoring functions that output the current operating status of theCPU of the communication partner.

    The software interfaces (see Chapter 4) to the user program constitute thecommunication SFCs/SFBs that are integral to the operating system. Thedata volume lies between 76 and 460 bytes (in the case of BSEND/BRCVup to 64 Kbytes).

  • Communication Services

    Communication with SIMATICEWA 4NEB 710 6075-02a 2-5

    TransmissionReliability

    A high degree of data security is achieved due to automatic repetition ofincomplete or incorrect telegrams on MPI/PROFIBUS and Industrial Eth-ernet (Layer 2 of the ISO reference model).Transmission of the data is acknowledged by the communication partneron Layer 7 of the ISO reference model. This is indicated in the appropriateblock.

    Integration inSTEP 7

    The SIMATIC S7 family, together with the S7 functions offers communica-tion functions via configured and non-configured S7 links. The configuredlinks are configured using STEP 7 and are implicitly established when thestation starts up. The non-configured links are explicitly established whenthe associated communication function is called.

    Assignment toSoftware Interface

    In SIMATIC S7-300/400 systems, the S7 functions are provided by thecommunication SFCs for non-configured links and the communicationSFBs for configured links.In SIMATIC M7-300/400 systems, the functional scope of the S7 functionsis provided by M7 API.On the PC, a subset of the S7 functions is provided via the SAPI-S7 inter-face.

  • Communication Services

    Communication with SIMATICEWA 4NEB 710 6075-02a2-6

    2.3 ISO Transport Services

    Overview ISO transport provides services for transmitting data via links. The link isautomatically monitored by the ISO transport service.The ISO transport service (ISO 8073 Class 4) corresponds to Level 4 ofthe ISO reference model.

    Features Large quantities of data can be transmitted using the ISO transport servicedue to "data blocking", i.e. useful data can be segmented in several datatelegrams.The ISO transport service facilitates communication to any communica-tion partner (e.g. SIMATIC S5 or PC) that supports sending and receivingdata in accordance with ISO transport.Data is only transferred on Industrial Ethernet with the ISO transport serv-ice.

    TransmissionReliability

    A high degree of data security is achieved due to automatic repetition inthe case of ISO transport and additional block checking mechanisms(CRC check on Layer 2).Receipt of data is acknowledged by the ISO transport service of the com-munication partner. This is indicated in the appropriate block.

    Integration inSTEP 7

    With the ISO transport services, the SIMATIC S7 family offers communi-cation functions for sending and receiving data via static links. The asso-ciated ISO transport links are configured using STEP 7. They are estab-lished when the station starts up.The STEP 7 "NCM S7 for Industrial Ethernet" option package supple-ments the STEP 7 link configuration with the "ISO transport" link type.

    Assignment toSoftware Interface

    In SIMATIC S7, the ISO transport services are used for communicationwith the blocks AG_SEND and AG_RECV via the Industrial Ethernet sub-net (see Chapter 4).On the PC, the ISO transport services are provided in the form of C func-tions.

  • Communication Services

    Communication with SIMATICEWA 4NEB 710 6075-02a 2-7

    2.4 ISO-on-TCP Services

    Overview The ISO-on-TCP service corresponds to the standard TCP/IP(Transmission Control Protocol/Internet Protocol) with the extendedRFC 1006 in accordance with Layer 4 of the ISO reference model.RFC 1006 is required because TCP provides data stream communicationwithout blocking the data into messages.This behavior is rectified in the case of the ISO protocol of Layer 4 with anend of message code (EOM). The EOM allows messages (data blocks) tobe transmitted. TCP/IP does not recognize this. Additive protocols have toused for the purposes of sending messages. RFC 1006 describes how theservices of ISO layer 4 can be mapped onto TCP. RFC 1006 is an officialstandard and is used by many manufacturers.

    Features The ISO-on-TCP service facilitates communication to any communicationpartner (e.g. PC or non-Siemens system) that supports sending and re-ceiving data in accordance with ISO-on-TCP.With the ISO-on-TCP service, data is only transferred on Industrial Ether-net.

    TransmissionReliability

    A high degree of data security is achieved due to automatic repetition andadditional block checking mechanisms (CRC check on Layer 2).Receipt of data is acknowledged by the communication partner. This isindicated in the appropriate block.

    Integration inSTEP 7

    With the ISO-on-TCP services, the SIMATIC S7 offers communicationfunctions for sending and receiving data via static links. The associatedISO-on-TCP links are configured using STEP 7. They are established im-plicitly when the station starts up.The STEP 7 "NCM S7 for Industrial Ethernet" option package supple-ments the STEP 7 link configuration with the "ISO-on-TCP" link type.

    Assignment toSoftware Interface

    In SIMATIC S7, the ISO-on-TCP services are used for communicationwith the blocks AG_SEND and AG_RECV via the Industrial Ethernet sub-net (see Chapter 4).On the PC, the ISO-on-TCP services are provided in the form of C func-tions.

  • Communication Services

    Communication with SIMATICEWA 4NEB 710 6075-02a2-8

    2.5 PROFIBUS-FDL Services

    Overview FDL (fieldbus data link) offers services for the transmission of data on thePROFIBUS subnet.The FDL service of SIMATIC S7 supports the SDA function (send datawith acknowledgement).The FDL service can be placed in Layer 2 of the ISO reference model.PROFIBUS-FDL complies with the European standard EN 50 170 Vol. 2PROFIBUS.

    Features Receipt of data is acknowledged by the FDL service of the communicationpartner.The FDL service facilitates communication to any communication partner(e.g. SIMATIC S5 or PC) that supports sending and receiving data in ac-cordance with the SDA function.

    TransmissionReliability

    A high degree of data security is achieved due to automatic repetition andadditional checking mechanisms (parity bit per character and check sumon Layer 2).

    Integration inSTEP 7

    With the FDL service, the SIMATIC S7 offers, communication functionsfor sending and receiving data via static links. The associated FDL linksare configured using STEP 7. They are established implicitly when thePROFIBUS-CP for SIMATIC S7 starts up.The STEP 7 "NCM S7 for PROFIBUS" option package supplements theSTEP 7 link configuration with the link type "FDL link".

    Assignment toSoftware Interface

    In SIMATIC S7, the FDL services are used for communication with theblocks AG_SEND and AG_RECV via the PROFIBUS subnet (see Chapter4).On the PC, the FDL services are provided in the form of C functions.

  • Communication Services

    Communication with SIMATICEWA 4NEB 710 6075-02a 2-9

    2.6 PROFIBUS-FMS Services

    Overview PROFIBUS-FMS (fieldbus message specification) offers services for thetransmission of structured data (FMS variables).The FMS service can be placed in Layer 7 of the ISO reference model. Itcomplies with the European standard EN 50170 Vol. 2 PROFIBUS andtherefore facilitates open communication with field devices.

    Features Services for reading and writing FMS variables via FMS links are avail-able.Receipt of data is confirmed by the partner with an application acknow-ledgement, i.e. the application running on the distant communicationpartner has received the data correctly.Data is only transferred with the FMS service on the PROFIBUS subnet.

    TransmissionReliability

    A high degree of data security is achieved due to automatic repetition andadditional checking mechanisms (parity bit per character and check sumon Layer 2).

    Integration inSTEP 7

    With the FMS service, the SIMATIC S7 offers communication functions forsending and receiving data via static links. The associated FMS links areconfigured using STEP 7. They are established implicitly when the stationfor SIMATIC S7 starts up.The STEP 7 "NCM S7 for PROFIBUS" option package supplements theSTEP 7 link configuration with the link type "FMS link".

    Assignment toSoftware Interface

    In SIMATIC S7, the FMS services are used for communication with thecommunication FBs for FMS via the PROFIBUS subnet (see Chapter 4).On the PC, the FMS services are provided in the form of C functions.

  • Communication Services

    Communication with SIMATICEWA 4NEB 710 6075-02a2-10

    2.7 PROFIBUS-DP Services

    Overview PROFIBUS-DP services facilitate direct communication with distributedI/O. From the control program, distributed I/O is addressed as if it werecentral I/O.PROFIBUS-DP services comply with the European standard EN 50170Vol. 2, PROFIBUS. Any standard slave can be connected.

    Features The "distributed I/O" expands the central I/O with I/O modules that areconnected to a central controller via a parallel bus (via an IM) or a serialbus (interface on CPU, IM or CP). The serial bus is PROFIBUS-DP whichcovers open communication up to Layer 7.The PROFIBUS-DP interface is either integrated on the S7/M7 CPUs orseparate interfaces are used (IMs, CPs).The I/O that is located, for example, in an expansion unit (ET 200 station)connected to PROFIBUS as a DP slave, is addressed in the same manneras any other I/O in the central controller or in an expansion unit. Thismeans that the I/O modules can be directly addressed using instructions orthey are accessed via process image transfer.

    TransmissionReliability

    A high degree of data security is achieved due to automatic repetition andadditional checking mechanisms (parity bit per character and check sumon Layer 2).

    Integration inSTEP 7

    Distributed I/O is configured using the hardware configuration functions ofSTEP 7.This also applies to the system integration of the ET 200 stations.Non-Siemens slaves can also be integrated into the hardware configura-tion system.

  • Communication Services

    Communication with SIMATICEWA 4NEB 710 6075-02a 2-11

    2.8 Global Data Communication (GD)

    Overview Global data communication is a simple communication service that isintegral to the operating system of the S7-300/400 CPUs.

    Features GD communication facilitates the cyclic exchange of global data, such asinputs, outputs, bit memories and areas in data blocks, between CPUs viathe MPI interface (without using blocks). Cyclic data transfer takes placewith the normal transfer of the process image.The response time is dependent on the cycle of the user program and itsvalue is a fraction of this cycle time (GD reduction factor).

    TransmissionReliability

    This technique is a broadcast technique; therefore, there is no guaranteefor data security.

    Integration inSTEP 7

    Global data communication is configured with STEP 7 via a global datatable. All S7-300/400 CPUs must be located in the same STEP 7 project.

  • Communication Services

    Communication with SIMATICEWA 4NEB 710 6075-02a2-12

    2.9 AS-i Services

    Overview AS-i services facilitate direct communication with decentralized actuatorsand sensors. From the control program, they are addressed as if they weredistributed I/O.The AS-i specification has been submitted in the form of a prototypestandard to the IEC and EN.Sensors and actuators that comply with this specification can be con-nected.

    Features The sensors and actuators are addressed in the central controller or ex-pansion unit in the same manner as any other I/O. This means that thesensors and actuators can be directly addressed with instructions or theycan be accessed via process image transfer.

    Power is supplied and data is transferred on the same cable. For each AS-i slave station, 4 sensors and actuators can be con-

    nected. Up to 4 input bits and 4 output bits are available per slave station. Transmission takes place at a fixed cycle time of up to 5 ms. The response time is

  • Communication Networks

    Communication with SIMATICEWA 4NEB 710 6075-02a 3-1

    3 Communication Networks

    Overview In this Chapter, you will become familiar with the communication networksthat are available for SIMATIC. You will learn which protocols are realizedin which network and which SIMATIC products are offered for thesecommunication networks. On the basis of this information, you will beable to select your own communication network.

    Chapter Overview In Section You will find On page3.1 Overview 3-23.2 Multipoint Interface (MPI) 3-53.3 PROFIBUS 3-73.4 Industrial Ethernet 3-12

    3.5 Point-to-Point Link 3-14

    3.6 AS-Interface 3-16

  • Communication Networks

    Communication with SIMATICEWA 4NEB 710 6075-02a3-2

    3.1 Overview

    Subnets inSIMATIC

    SIMATIC offers the following subnets which meet the requirements of thedifferent automation system levels (management, cell, field and actua-tor/sensor level):

    MPI The MPI subnet meets the requirements of the field level and cell levelwith low coverage. MPI is a multipoint interface in SIMATIC S7/M7 and C7systems. It is designed as a programming device interface and is intendedfor networking a small number of CPUs for the purpose of exchangingsmall volumes of data.

    PROFIBUS PROFIBUS is the network for the cell and field level in the open, multi-vendor SIMATIC communication system.Two versions of PROFIBUS are offered:

    PROFIBUS DP, the fieldbus for high-speed, cyclic transfer of smallvolumes of data

    PROFIBUS, in the cell, for the high-speed exchange of medium-sized quantities of data with communication partners that have equalrights

    Industrial Ethernet Industrial Ethernet is the network for the management and cell level in theopen, multi-vendor SIMATIC communication system. Industrial Ethernet issuitable for the high-speed exchange of large quantities of data and facili-tates communication between one site and another via gateways.

    Point-to-PointLink

    A point-to-point link is not technically a subnet. In SIMATIC, this link isimplemented via point-to-point communication processors (CP), wherebytwo stations are linked together.

    AS-Interface The AS-Interface or actuator/sensor interface is a subnet system for thelowest process level in automation systems. It is specially designed for theinterconnection of binary sensors and actuators. The data volume is lim-ited to 4 bits per slave station.

  • Communication Networks

    Communication with SIMATICEWA 4NEB 710 6075-02a 3-3

    Access Technique The access technique specifies how and when a station can send its dataon the subnet. In the event of simultaneous requests to send from differentstations, it controls the access authorization. The following types of accesstechniques exist:

    CSMA/CD (carrier sense multiple access / collision detection) Token passing Master/slave

    The access techniques are described in detail in the sections describingthe relevant subnets.

    Max. Length ofNetwork

    This is the greatest distance between two stations of a subnet. A subnetcan comprise one or more segments (bus segments). Bus segments canbe connected via segment couplers such as repeaters or bridges.

    Transfer Medium The transfer medium is the bus cable via which data is transferred.A distinction is usually made between copper and fiber-optic cables.

    Copper: 2-core cable, coaxial cable, twisted pair Fiber-optic: Glass or plastic fiber-optic cables

  • Communication Networks

    Communication with SIMATICEWA 4NEB 710 6075-02a3-4

    Technical Data The following table provides an overview of the subnets.

    Features MPI PROFIBUS IndustrialEthernet

    AS-Interface

    Standards SIEMENS pro-cedure

    PROFIBUS toEN 50170Volume 2

    Ethernet toIEEE 802.3

    AS-ispecification toIEC TG 17B

    Access technique Token passing Token passingwith subordinatemaster/slave

    CSMA/CD Master/slave

    Transmission rate 187.5 Kbit/s 9.6 Kbit/s -12 Mbit/s

    10 Mbit/s 167 Kbit/s

    Transfer medium Copper:Shielded 2-corecable

    Fiber-optic:Glass or plasticfiber-optic cable

    Copper:Shielded 2-corecable

    Fiber-optic:Glass or plasticfiber-optic cable

    Copper:Double-shieldedcoaxial cable orIndustrialTwisted Pair

    Fiber-optic:Glass fiber-opticcables

    Copper:Unshielded2-core cable

    Max. no. ofstations

    32 127 > 1000 32

    Max. length ofnetwork

    50 m(expandable us-ing RS485 re-peaters or opti-cal link modules)

    Copper:Approx. 10 km 1)

    Fiber-optic:over 100 km 2)

    Copper:1.5 km

    Fiber-optic:4.5 km

    Cable length max.300 m

    Topology Line, tree,ring, star

    Line, tree,ring, star

    Line, tree,ring, star

    Line, tree

    Services S7 functions, GD S7 functions,FDL, FMS, DP

    S7 functions,ISO transport,ISO-on-TCP

    AS-i functions

    Automation systemlevel

    Cell and fieldlevel

    Cell and fieldlevel

    Managementand cell level

    Actuator/sensorlevel

    Hamming distance 4 4 2 -

    1)

    Depends on transmission rate2) Depends on OLM type used

  • Communication Networks

    Communication with SIMATICEWA 4NEB 710 6075-02a 3-5

    3.2 Multipoint Interface (MPI)

    Applications The MPI subnet is suitable for the field level and cell level with low cover-age. MPI is a multipoint interface in SIMATIC S7/M7 and C7 systems. It isdesigned as a programming device interface and is intended for network-ing a small number of CPUs.

    MPI

    S7 - 300S7 - 400

    PG

    OP

    Figure 3-1: Example of an MPI Subnet

    Access technique Token bus (see PROFIBUS)

    Features The MPI interface is integral to the S7/M7 and C7 CPUs. This pro-vides a simple networking capability.

    Networking of a small number of communication partners with smalldata volumes.

    Global data communication offers a simple, configurable communi-cation service.

    Several CPUs and programming devices/OPs can be connected.

  • Communication Networks

    Communication with SIMATICEWA 4NEB 710 6075-02a3-6

    Technical Data Standards SIEMENS-specificStations Maximum of 32 active stationsAccess technique Token passingTransmission rate 187.5 Kbit/s.Transfer medium Shielded 2-core cable,

    fiber-optic (glass or plastic)Max. length ofnetwork

    Segment length 50 m,via RS 485 repeaters up to 1100 m,with fiber-optic cables via OLM > 100 km

    Topology Line, tree, star, ringServices S7 functions

    Global data communication

    SIMATIC Products System Modules ServicesS7-300 CPU 312 IFM

    CPU 313CPU 314, CPU 314 IFMCPU 315CPU 315-2 DP

    S7 functions, GDS7 functions, GDS7 functions, GDS7 functions, GDS7 functions, GD, DP

    S7-400 CPU 412-1CPU 413-1CPU 414-1CPU 416-1CPU 413-2 DPCPU 414-2 DPCPU 416-2 DP

    S7 functions, GDS7 functions, GDS7 functions, GDS7 functions, GDS7 functions, GD, DPS7 functions, GD, DPS7 functions, GD, DP

    M7-300 CPU 388-4 S7 functionsM7-400 CPU 488-4

    CPU 488-5S7 functionsS7 functions

    C7-620 C7-623/624C7-626C7-626-2DP

    S7 functions, GDS7 functions, GDS7 functions, GD, DP

    Programmingdevice

    PG 720, PG 720CPG 740PG 760

    S7 functionsS7 functionsS7 functions

    OP OP 3, OP 5, OP 7, OP 15,OP 17; OP 25, OP 35,OP 37

    S7 functionsS7 functionsS7 functions

    PC CP 5412-A2 (ISA)CP 5411 (ISA)CP 5511 (PCMCIA)MPI card (ISA)CP 5611 (PCI)

    S7 functionsS7 functionsS7 functionsS7 functionsS7 functions

    More products are listed in Catalogs ST 70 and IK 10.

  • Communication Networks

    Communication with SIMATICEWA 4NEB 710 6075-02a 3-7

    3.3 PROFIBUS

    Definition PROFIBUS is the network for the cell and field level in the open, multi-vendor SIMATIC communication system. PROFIBUS is physically either acopper cable network based on a shielded 2-core cable or a fiber-opticcable network.

    Access technique The network access technique for PROFIBUS corresponds to the "Tokenbus" method specified by EN 50170, Volume 2 for active stations and the"Master/slave" method for passive stations.

    Figure 3-2: Principle of the PROFIBUS Access Technique

    The access technique is independent of the transfer medium. Figure 3-2shows the procedure used with active and passive stations. This is ex-plained briefly below:All active stations (masters) form, in a prespecified sequence, the "logicaltoken ring" whereby each active station is aware of the other active sta-tions and their sequence in the logical ring (the sequence is independentof the topological arrangement of the active stations on the bus).The right to access the medium (the "token") is passed from active stationto active station in accordance with the sequence specified by the logicalring.When a station receives the token (addressed to it), it has permission tosend telegrams. The time allowed is specified by the so-called tokenholding time. Once this has elapsed, the station is only permitted to sendone more high-priority message. If the station is not waiting to send amessage, it passes the token onto the next station in the logical ring im-mediately. The corresponding token timers ("max. token holding time",etc.) are configured for all active stations.

    PROFIBUS

    Master/slave assignment

    Token

    Slave Slave SlaveSlave SlaveSlave

    MasterMasterMaster

  • Communication Networks

    Communication with SIMATICEWA 4NEB 710 6075-02a3-8

    If an active station is in possession of the token and connections to pas-sive stations are configured for it (master/slave links), these passive sta-tions are queried (e.g. variables are read) or data is sent to them (e.g.setpoint values).Passive stations never receive the token.This access technique allows stations to be added and removed underoperating conditions.

    Applications forPROFIBUS

    The PROFIBUS subnet for the cell and field level supports the exchangeof information between field devices and with systems at a higher systemlevel. It is used to transfer small to medium quantities of data. In SIMATICS7, a CP is always required for PROFIBUS.

    PROFIBUS

    S7 - 300

    S5 with PROFIBUS-CPPG

    OPS7 - 400 PROFIBUS-CP

    PROFIBUS-CP

    PROFIBUS-CP

    Figure 3-3: Example of a PROFIBUS Subnet

  • Communication Networks

    Communication with SIMATICEWA 4NEB 710 6075-02a 3-9

    Applications forPROFIBUS-DP

    PROFIBUS-DP offers a standardized interface for the transfer of processinput and process output data between SIMATIC S7 stations and fielddevices (DP slaves). PROFIBUS-DP is characterized by high-speed, cy-clic exchange of small quantities of data between DP masters and DPslaves.

    DP master

    PROFIBUS

    DP masterPG/PC

    e.g.AG 95U/DPslave

    DP slave

    CPNon-SiemensDP slave

    S7 - 315-2 DP

    S7 - 300 PROFIBUS-CP

    STEP 7NCM S7 forPROFIBUS

    e.g.ET 200 M/U/B

    PROFIBUS-CP

    OP

    Figure 3-4: Example of a PROFIBUS-DP Subnet

    Features ofPROFIBUS

    The following services can be used simultaneously on PROFIBUS FDL, FMS and S7 functions or DP, FDL an