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 Siemens Siemens Aktiengesellschaft Wir haben den Inhalt der Druckschrift auf bereinstim- mung mit der beschriebenen Hard- und Software geprft. Dennoch knnen Abweichungen nicht ausgeschlossen werden, so da wir fr die vollstndige bereinstimmung keine Gewhr bernehmen. Die Angaben in der Druck- schrift werden jedoch regelmig berprft. Notwendige Korrekturen 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 oder GM-Eintragung. Copyright Siemens AG 1997 All Rights Reserved We have checked the contents of this manual for agree- ment with the hardware described. Since deviations cannot be precluded entirely, we cannot guarantee full agreement. However, the data in this manual are reviewed regularly and any necessary corrections included in subsequent editions. Suggestions for improvement are welcome. Technical data subject to change. The reproduction, transmission or use of this document or its contents are not permitted without express written authority. Offenders will be liable for damages. All rights, including rights created by patent grant or registration of a utility or design, are reserved. Copyright Siemens AG 1997 All Rights Reserved Nous avons vrifi la conformit du contenu du prsent manuel avec le matriel et le logiciel qui y sont dcrits. Or, des divergences n'tant pas exclues, nous ne pouvons pas nous porter garants pour la conformit intgrale. Si l'usage du manuel devait rvler des erreurs, nous en tiendrons compte et apporterons les corrections ncessaires ds la prochaine 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 son contenu sont interdites, sauf autorisation expresse. Tout manquement cette rgle est illicite et expose son auteur au versement de dommages et intrts. Tous nos droits sont rservs, notamment pour le cas de la dlivrance d'un brevet ou celui de l'enregistrement d'un modle d'utilit. Copyright Siemens AG 1997 All Rights Reserved Siemens Aktiengesellschaft Electronics Factory, Karlsruhe Printed in the Federal Republic of Germany SIMATIC Communication with SIMATIC Manual Note The contents of this manual shall not become part of or modify any prior or existing agreement, commitment or relationship. The Sales Contract contains the entire obligations of Siemens. The warranty contained in the contract between the parties is the sole warranty 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 you require further information or face special problems that have not been dealt with in sufficient detail in this document, please contact your local Siemens office. General information This equipment is driven by electricity. Hazardous voltages are present in this electrical equipment during operation. 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 conversant with 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 and operated 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-up and 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 SIMATIC EWA 4NEB 710 6075-02a I Preliminary Remarks Purpose of this Manual This manual provides an overview of communication in SIMATIC S7/M7/C7 with the following content: Introduction to communication and explanation of terms used. In this introduction 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 the manual you will find out which communication services you can use on the various communication networks. After reading this chapter, you will be able to select the communication possibilities that are suitable 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. Examples Program examples are provided for the different communication possibilities and you will also find out in which software package they are supplied. Readership This manual has been written for planning and project engineers as well as programmers 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 SIMATIC II EWA 4NEB 710 6075-02a Where to Start in this Manual Where can you find the information that you want in this manual? You are looking for the following information..... .....you can find this information in Chapter You would like to know more about communication Chapter 1 Introduction and Basics of Communi- cation You know all about communication and need to know about the pos- sibilities with SIMATIC Chapter 2 Communication Services Chapter 3 Communication Networks Chapter 4 Communication Functions for S7-300/400 Chapter 5 Communication Functions for M7-300/400 Chapter 6 Cyclic Communication for S7/M7/C7-300/400 Appendix You want to expand an existing network Chapter 3 Communication Networks Appendix You already have the hardware and need to know about pro- gramming/configuring or which software tools will provide the nec- essary support Chapter 9 Project Engineering and Configuring with STEP 7 You are looking for examples Chapter 10 Programming Examples You need detailed information on the hardware components or soft- ware Appendix STEP 7 Documentation You require information on the performance features Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a III Finding Your Way Rapid access to specific information is supported in this manual by the following 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 page provides an overview of the contents of the paragraph. A glossary follows the appendices, with explanations of important technical terms used in the manual. Scope of this Manual This manual describes the communication functions that you can program and 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 the appendix. Communication with SIMATIC IV EWA 4NEB 710 6075-02a Location in the Communication Landscape The "Communication with SIMATIC" manual provides an introduction to and 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 of the communication partners and on configuring and programming. Support is also available in STEP 7 and NCM S7 via the online help function. Program- ming Manual Manual Communication with SIMATIC System Software for S7-300/400 Program Design STEP 7 User and Reference Manuals M7 Basis Software Hardware Manuals - S7-200 - S7/M7-300/400 - ET 200 - SIMATIC NET Manual Manual Manual SIMATIC NET Manuals for NCM S7 Profibus/ Industrial Ethernet Figure 0-1Documentation Landscape for SIMATIC Communication with SIMATIC EWA 4NEB 710 6075-02a V Additional Support Should questions arise concerning the use of the products described in this manual that are not answered here, please approach your local Siemens contact 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 address provided. We would also be grateful if you use this opportunity to give your personal assessment of the manual in the appropriate section of the form. We offer courses to make starting off with SIMATIC much easier for you. Contact your regional training center or the central training center in 90327 Nuremberg, Germany, tel. ++49 911 895 3154. Up-to-Date Information 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-7100 To call the mailbox, use a modem with up to 28.8 kbaud (V.34), and set 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 can also be posted in the Internet or in the mailbox. Communication with SIMATIC EWA 4NEB 710 6075-02a 1-1 Contents 1 Introduction and Basics of Communication........................................................................1-1 1.1 Basic Terminology ................................................................................................................1-2 1.2 Network Topology.................................................................................................................1-5 1.3 Classification of Networks.....................................................................................................1-8 1.4 Access Techniques...............................................................................................................1-9 1.5 Client/Server Concept.........................................................................................................1-11 1.6 Links...................................................................................................................................1-12 1.6.1 Class of Link ....................................................................................................................1-14 1.6.2 Link Types .......................................................................................................................1-15 1.6.3 Link Resources ................................................................................................................1-16 1.7 ISO Reference Model .........................................................................................................1-17 1.8 Coupled Networks...............................................................................................................1-21 1.9 Reliability of Transmission ..................................................................................................1-25 1.10 Application Areas for the Subnets ..................................................................................... 1-26 2 Communication Services ......................................................................................................2-1 2.1 Introduction...........................................................................................................................2-2 2.2 S7 Functions.........................................................................................................................2-4 2.3 ISO Transport Services.........................................................................................................2-6 2.4 ISO-on-TCP Services ...........................................................................................................2-7 2.5 PROFIBUS-FDL Services.....................................................................................................2-8 2.6 PROFIBUS-FMS Services....................................................................................................2-9 2.7 PROFIBUS-DP Services.....................................................................................................2-10 2.8 Global Data Communication (GD)....................................................................................... 2-11 2.9 AS-i Services...................................................................................................................... 2-12 3 Communication Networks.....................................................................................................3-1 3.1 Overview..............................................................................................................................3-2 3.2 Multipoint Interface (MPI)......................................................................................................3-5 3.3 PROFIBUS...........................................................................................................................3-7 3.4 Industrial Ethernet............................................................................................................... 3-12 3.5 Point-to-Point Link ..............................................................................................................3-14 3.6 AS-Interface........................................................................................................................ 3-16 4 Communication Functions for S7-300/400...........................................................................4-1 4.1 Introduction...........................................................................................................................4-2 4.2 Communication SFCs for Non-Configured S7 Links..............................................................4-3 4.2.1 Communication via MPI Subnets .......................................................................................4-4 4.2.2 Communication Within an S7 Station.................................................................................4-6 4.3 Communication SFBs for Configured S7 Links......................................................................4-8 4.4 SEND/RECEIVE Interface .................................................................................................. 4-13 4.5 FMS Interface..................................................................................................................... 4-15 4.6 Communication via Point-to-Point Links.............................................................................. 4-18 5 Communication Functions for M7-300/400 ..........................................................................5-1 5.1 Communication Functions for Non-Configured S7 Links .......................................................5-2 5.2 Communication Functions for Configured S7 Links...............................................................5-5 Communication with SIMATIC 1-2 EWA 4NEB 710 6075-02a 6 Cyclic Communication for S7/M7/C7-300/400 ......................................................................6-1 6.1 Introduction...........................................................................................................................6-2 6.2 Global Data Communication (GD).........................................................................................6-3 6.3 Distributed I/O via PROFIBUS-DP........................................................................................6-7 6.4 Distributed I/O via the AS-i bus.............................................................................................6-9 7 Communication Functions on PCs.......................................................................................7-1 7.1 Communication Functions for Configured S7 Links (SAPI-S7) ..............................................7-2 7.2 PC Interface for SEND/RECEIVE .........................................................................................7-5 8 Connecting SIMATIC Programming Devices/OPs................................................................8-1 8.1 Programming Device/PC Interfacing for STEP 7 on Subnets ................................................8-2 8.2 SIMATIC OP Interface to Subnets ........................................................................................8-4 8.3 TeleService ..........................................................................................................................8-6 9 Project Engineering and Configuring with STEP 7 .............................................................9-1 9.1 S7 Project .............................................................................................................................9-2 9.2 Specifying the Network Configuration ...................................................................................9-3 9.3 Address Assignment .............................................................................................................9-5 9.3.1 Address Assignment via MPI .............................................................................................9-5 9.3.2 Address Assignment via PROFIBUS..................................................................................9-6 9.3.3 Address Assignment via Ethernet.......................................................................................9-7 9.4 Link Resources .....................................................................................................................9-8 9.5 Configuring Links................................................................................................................9-13 9.5.1 Special Case of the Point-to-Point Link ............................................................................ 9-16 9.5.2 Links to Non-S7 Stations..................................................................................................9-17 10 Programming Examples.................................................................................................... 10-1 10.1 Communication with SFCs................................................................................................ 10-2 10.2 Communication with SFBs................................................................................................ 10-4 10.3 Communication with FDL between SIMATIC S7s.............................................................. 10-7 10.4 Communication with FDL - SIMATIC S7 and S5 ............................................................... 10-9 10.5 DP Communication via CPs............................................................................................10-11 10.6 Communication with ISO Transport between SIMATIC S7s ............................................ 10-12 10.7 Communication with ISO Transport - SIMATIC S7 and S5.............................................. 10-14 A Appendix............................................................................................................................... A-1 A.1 Communications Matrix....................................................................................................... A-2 A.1.1 MPI Subnet ...................................................................................................................... A-3 A.1.2 PROFIBUS Subnet........................................................................................................... A-6 A.1.3 Industrial Ethernet ............................................................................................................ A-9 A.2 Technical Data .................................................................................................................. A-13 A.2.1 SIMATIC S7-200 ............................................................................................................ A-13 A.2.2 SIMATIC S7-300 ............................................................................................................ A-14 A.2.3 SIMATIC S7-400 ............................................................................................................ A-16 A.2.4 SIMATIC M7-300/400..................................................................................................... A-18 A.3 Performance Data ............................................................................................................. A-19 A.3.1 Response Time for Communication SFBs via Configured S7 Links ................................ A-19 Introduction and Basics of Communication Communication with SIMATIC EWA 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 within the context of SIMATIC. You will become familiar with the most important terms and will find out where communication takes place from the view- point of the user. Chapter Overview In Section You will find On page 1.1 Basic Terminology 1-2 1.2 Network Topology 1-5 1.3 Classification of Networks 1-8 1.4 Access Techniques 1-9 1.5 Client/Server Concept 1-11 1.6 Links 1-12 1.7 ISO Reference Model 1-17 1.8 Coupled Networks 1-21 1.9 Reliability of Transmission 1-25 1.10 Application Areas for the Subnets 1-26 Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-2 1.1 Basic Terminology Overview The basic terminology and principles of communication that are important for information transfer between controllers and between controllers and OPs/PCs will be explained here. Communication Communication involves the transmission of data between two communi- cation partners of different types, controlling the communication partner and 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 Communication Partner A communication partner is a module that is capable of performing com- munication functions, i.e. exchanging data. The physical location of the communication partner can either be within the same unit or in another item of equipment. Examples of communication partners are CPUs or FMs. Station A station is a device which as a self-contained unit (e.g. programmable controller, 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 in order 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 pass through gateways. The physical entirety of a subnet (MPI, PROFIBUS, Industrial Ethernet) is also designated as a transmission medium. CPU CPU Station Station Module with communication capability Module with communication capability FM Subnetwork CPU CPU FM Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-3 Network A network is a unit which comprises one or more interconnected subnets of the same or different type. It comprises all stations that are able to communicate with one another. Figure 1-2: Example of a Communication Network Link A link is the logical assignment (via configuration) of one communication partner to another for the purpose of executing a specific communication service. The link is directly assigned to a communication service. The link has two end points which contain the information required for addressing the communication partner as well as further attributes for es- tablishing the link (see Section 1.6). The communication functions only use the local end point for link reference purposes. Communication Functions These are the functions offered by a software interface which utilize communication 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) or query its current operating status. Communication Services and Software Interfaces 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 communication services (simply referred to as services from now on) are offered via software interfaces in the data terminal (e.g. SIMATIC S7 system func- tions). The communication services can be classified with respect to their performance in accordance with the ISO reference model (see Section 1.7). Network Subnet 3 Subnet 2 Subnet 1 Station Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-4 A software interface does not necessarily offer all the communication functions of a service. The communication service can be provided in the respective data terminal (e.g. PLC, PC) using various software interfaces. Protocol This is a bit-specific arrangement between two communication partners for the purpose of executing a specific communication service. The proto- col defines the structure of the contents of the data traffic on the physical cable 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 are larger than the data consistency can therefore become inconsistent as a whole. This means that a self-contained data area (larger than the data consistency) can comprise new and old consistent data blocks at any one time. Introduction and Basics of Communication Communication with SIMATIC EWA 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 as sensors, actuators or PLCs exchange information, they must be physically interconnected in some form of structure. In this manner they form a communication network. The network topology is the basic geometric structure of the network. The communication stations are the nodes of the network. They are linked by junctions. The simplest structure is obtained when the network comprises just two communication stations, i.e. two nodes. 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 bus structure, even though a bus does not necessarily have a line structure. In this case, all stations on the network only require one interface. They can be 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. It has to be ensured that only one station is able to transmit at a time, during which all other stations are only permitted to listen. This means that rules are necessary to define when a station has the right to transmit. Bus ac- cess techniques are important here. They are also necessary for the other topologies described below. Station 2 Station 3 Station 1 Figure 1-3: Example of Line Topology Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-6 Ring Certain similarities exist between the line and ring structure. Permission to send also has to be controlled via bus access techniques in this case. A ring can be constructed in the form of point-to-point links connected in series. An advantage of this type of ring is that each node can operate as a repeater so that large distances can be covered The disadvantage of the ring structure is, however, that failure of a node causes much greater problems 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 3 Station 1 Station 5 Station 4 Station 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 controls the entire communication and if it fails, the entire network usually fails with it. Station 2 Station 3 Station 1 = Star coupler * * Figure 1-5: Example of Star Topology Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-7 Tree Finally, the tree structure is also used in automation engineering. It can also be interpreted as a chain of a number of line structures of different lengths and also of different types. In this case, the elements that are used to connect the separate lines have a special significance. Station 2 Station 3 Station 1 R R = Repeater Station 5 Station 4 R Figure 1-6: Example of Tree Topology These elements can be simple repeaters for cases in which the connected sections are of the same type, but they can also be converters (routers, bridges, gateways) for cases in which the sections to be connected are of different types. Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-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 the boundaries tend to overlap. Limits can be defined for the distance covered by the network as follows: LAN < 5 km MAN < 25 km WAN > 25 km. Topology of the Networks Statements can be made about the topologies implemented on the basis of 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 the expected communication traffic between the nodes of the network). For reasons of economy (the economic use of cables), irregular webs in a tree structure usually result. The topology of a LAN, however, is more clearly structured because the overall functional capability is much more impor- tant than the economic use of cables. Line, ring and star structures are typical for LANs. Apart from LANs and WANs, FANs (field area networks) are also being introduced. The FAN is used in process automation for communication at the field level in the process environment, whereas the MAN and WAN are responsible for communication within and between the higher levels of the hierarchy (works, production and company management levels). This is particularly important when different production centers, sales companies, etc. form a single administrative unit but are separated by large distances. Transmission Medium The choice of physical transmission medium depends mainly on the re- quired length of the network, the degree of intrinsic safety required and the transmission rate. The commonly used transmission mediums, listed in ascending 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 SIMATIC EWA 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 to transmit on the bus. The number of "listening" telegram receivers is not important. 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 gives the slaves the command to send. Direct communication between slaves is usually not possible. The advantage of master/slave techniques is the simple and therefore efficient bus control. This is why they are often used in field buses such as PROFIBUS-DP. Figure 1-8: Example of a Master/Slave Configuration Master/slave assignment Bus system Slave Slave Slave Master Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-10 Token Passing Token passing is a decentralized, deterministic technique. In this case, a token (fixed bit pattern) travels through the communication network as a sign 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. If this technique is used in a line topology, the network is often described as a token bus. The token is passed from station to station in a logical ring in accordance with certain rules. If the network is physically in the form of a ring, 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 in IEEE 802.3). In this case, any station is permitted to send at any time, provided that no other station is transmitting. Conflict occurs, however, as a result of signal runtimes when two stations start to transmit at the same time because the bus was free. In this case, both stations detect the colli- sion by monitoring, stop transmitting and try again after a random waiting time. Buses that use CSMA/CD (e.g. Industrial Ethernet) usually operate at a transmission rate of 10 Mbits/s. Introduction and Basics of Communication Communication with SIMATIC EWA 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 separating these functions is higher productivity in user program development as a result of clear task definition, easier integration of different applications and better access to data from a large number of work stations. Mail serv- ers and communication servers are available for the purpose of properly organizing 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 to ensure that special functions are available (e.g. communication services). The communication functions of the server do not have to execute in the user 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 be able 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 be described 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 the server (e.g. programmable controller) provides the service. Information is usually 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 is based on a Layer 7 view and the concept of a slave is based on a Layer 2 view. A station that only has the functional scope of a slave is not able to send on its own initiative. If an event occurs (e.g. transition to the STOP state), a server, however, is able to send an appropriate signal via the bus. Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-12 1.6 Links Introduction A link is the logical assignment of one communication partner to another for the purpose of executing a specific communication service. The link is directly 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 as well as further attributes for establishing the link. The communication functions in the user program only reference the local end point of the link. S7 CPU Subnet CP S7 CPU CP S7 link Communications function USEND Communications function URCV S5 CPU CP Handling block SEND S7 CPU CP Communications function AG_RECV FDL link Subnet 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: Links Class 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 one end point and active at the other. Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-13 Static Static links are used when sufficient link resources are available in the individual stations of a system configuration and they do not have to be released again. Time-consuming connecting and disconnecting of links do not 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 different communication partners or for the purpose of using existing link resources more efficiently. The actual connecting and disconnecting of links does not take place when the station starts up, but only in response to an explicit request from the 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 SIMATIC EWA 4NEB 710 6075-02a 1-14 1.6.1 Class of Link Use Depending on the software interface used, the associated communication functions require either configured or non-configured links (see Chapter 2). Configured Links This type of link is configured using STEP 7 (in the link table), whereby a local 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 and that of its communication partners. Note Communication functions that originate from a SIMATIC OP or PC also require configured links. In this case, however, the links are configured using a separate tool (e.g. ProTool or COML). These links also reserve link resources (for S7 functions) on the CPUs. Non-Configured Links Non-configured links are not configured via the link table in STEP 7. These links are established implicitly when the communication function is called and are removed if necessary when the data has been successfully transmitted. Introduction and Basics of Communication Communication with SIMATIC EWA 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. For this reason, a corresponding link type exists for each communication service. In SIMATIC S7 the link types are allocated to services as follows (see Section 2.1): Service Link Type S7 functions S7 link ISO transport ISO transport link ISO-on-TCP ISO-on-TCP link FDL FDL link FMS FMS link Protocol driver e.g. RK512 Point-to-point link The appropriate link type can be selected on configuring the links using STEP 7. Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-16 1.6.3 Link Resources Overview Every link requires link resources on the participating stations for the end point or for the transition point (e.g. CP). The number of link resources depends on the type of CPU or CP (see Page 9-13). If all the link resources for a communication partner are reserved, it is not possible to establish a new link. Figure 1-9: S7 Functions via Integrated MPI or via PROFIBUS/Industrial Ethernet with CP CPU MPI Industrial Ethernet PROFIBUS CP Free link resource Reserved link resources Introduction and Basics of Communication Communication with SIMATIC EWA 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, it is 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 International Standardization 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 station is defined. This ensures that only one station is able to send data via the network at any given time. Data reliability and consistency are only ensured by the functions of Layer 4 (transport layer). Apart from controlling transport, the transport layer also 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 for the purpose of executing a specific communication service. The protocol defines 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 SIMATIC EWA 4NEB 710 6075-02a 1-18 ISO Reference Model The ISO reference model defines layers in which the response of the communication partners is defined. These layers are arranged one above the other whereby Layer 7 is the uppermost layer. The ISO reference model will be referred to later in the descriptions of the services. Only identical layers communicate with one another. The way in which the separate layers are implemented in a real case is not specified 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 to obtain high-speed communication with real-time capability and essential functions 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 communication services Communication services, e.g. Read/Write Start/Stop 6 Presentation layer Data presentation: Converts the standard presentation format for the communication system to a device- specific format Common language 5 Session layer Synchronization: Opening, closing and monitoring a session Coordination of the session 4 Transport layer Connecting / disconnect- ing links, repeating packets, sorting packets, packaging Error-free transfer of packets 3 Network layer Addressing other net- works/ routing, flow control Communication between two sub- nets 2 Data link layer Access techniques: Data block boundaries, error-free data transfer, error detection, error detection, error handling CRC check CSMA/CD token 1 Physical layer Physical aspects of data transfer, transmission medium, baudrate, specification of the electrical, mechanical and 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 SIMATIC EWA 4NEB 710 6075-02a 1-19 Physical Layer Layer 1: This layer ensures that bits are transferred via the physical medium in the order in which they are received from the data link layer (Layer 2). The electrical 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 transmission errors and checking the flow. In local networks, the data link layer also guarantees exclusive access to the transfer medium. For this purpose, the layer is subdivided into two sublayers, medium access control (MAC) and logic link control (LLC), which are also known as Layer 2a and Layer 2b respectively. 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 result of the special real-time requirements that apply to fieldbus systems, these access 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 may pass through several transit systems. For this purpose, the network layer has to organize the routing. Transport Layer Layer 4: The transport layer is responsible for providing the user with a reliable end-to-end link. The services provided include establishing a transport link, transferring data and removing the link. The service user can demand a 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 event of interruption of the link, the entire transfer procedure is not repeated, but can be restarted from a specific synchronization point. Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-20 Presentation Layer Layer 6: Systems of different types usually speak different languages initially on data transfer. The presentation layer translates the different languages of the participants into a uniform language with an abstract syntax. In most cases, Abstract Syntax Notation one (ASN.19 defined in ISO 8824 is used and the associated Basic Encoding Rules (BER) are employed. Application Layer Layer 7: The application layer comprises the application-specific services of the various communication applications. The applications are numerous, so it is difficult to establish uniform standards. The most important standard in automation is the manufacturing message specification (MMS) which de- scribes the services and protocols of the MAP (manufacturing automation protocol) application layer. Modern fieldbus systems are strongly oriented towards MMS with respect to the design of the application layer. The specifications of PROFIBUS are described in detail by Layers 1, 2 and 7 of the ISO layer model. All seven layers have not been implemented for the sake of simplicity. Layers 3 to 5 are "empty". PROFIBUS is a multi-master system. A hybrid bus access method is used to 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 SIMATIC EWA 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 be coupled have usually developed separately over the years and cannot be directly coupled because information arriving from subnet A cannot be interpreted by the protocols of subnet B. An important requirement is that the coupled subnets should behave like a single subnet from the viewpoint of the user, i.e. that coupling should not have any detrimental effect on the functioning of the network. The coupling of subnets is therefore invisible to the user; s/he is not aware of it and does not have to make any software modifications because of it. Depending on the complexity of the coupling and the disparity between the subnets to be coupled, either repeaters, bridges, routers or gateways can be used as the network coupling elements. They can be mapped onto the ISO reference model on the basis of their tasks. Repeater The repeater copies the information received via the cable to the opposite side of the coupling and amplifies it in the process. A repeater operates invisibly for all layers of the communicating stations, i.e. even the physical layers of both networks must be identical. Repeaters are often used, not to connect two subnets of the same type, but to expand or extend an existing subnet, e.g. a bus system. Network Subnet Repeater Station A Station C Physical Application Session Presentation Data link Network Physical Transport Application Session Presentation Data link Network Physical Transport R A C Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-22 Bridge Bridges are used to couple subnets that use the same protocols in the data link layer (Logical Link Control, LLC). The transfer medium and the bus access techniques (medium access control, MAC) of the subnets to be linked can be different. Bridges are usually used when local networks with different topologies are to be connected or when specific structures have to 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 that only 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 Session Presentation Data link Network Physical Transport Application Session Presentation Data link Network Physical Transport A C Data link Physical Physical B Introduction and Basics of Communication Communication with SIMATIC EWA 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 message through an existing network (routing). The shortest distance or the shortest transmission delay can be used as criteria for the optimum route. The router performs its task by changing the source and destination addresses of the network layer for the arriving data packets before it sends them onwards. Routers have to perform a much more complex task than bridges, so they have lower operating speeds. Network Subnet Subnet Router Station A Station C Application Session Presentation Data link Network Physical Transport Application Session Presentation Data link Network Physical Transport A C Network Data link Data link Physical Physical B Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-24 Gateway Gateways are used to connect networks of differing architectures, i.e. any two subnets can be connected. Within the context of the ISO reference model, the task of gateways is to convert the protocols of all layers. A gateway 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 structure from the 7-layer structure, as shown in the diagram. High costs and low speeds are typical characteristics of network connections via gateways. Network Subnet Subnet Gateway Station A Station C Application Session Presentation Data link Network Physical Transport Application Session Presentation Data link Network Physical Transport Session Presentation Data link Network Physical Transport Session Presentation Data link Network Physical Transport A C Application G Introduction and Basics of Communication Communication with SIMATIC EWA 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 the best possible reliability and safe data transfer. When data is received, it has an associated error probability above Layer 1 as a result of interfer- ence acting on the transfer medium. The terms "bit error rate" and "block error probability" can be found in the literature in this context. In Layer 2, coding is performed for data security purposes. A characteristic of 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. how many 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 an error. Residual Error Probability Above Layer 2, a residual error probability remains. It specifies the ratio of undetected, faulty telegrams to the total number of telegrams received. The residual error probability can therefore be regarded as a measure of transmission reliability. This depends on the interference on the cable, the physical coding used (e.g. NRZ, Manchester coding) and the message coding (telegram). Hamming Distance The hamming distance, therefore, can only be applied as a means for assessing the transmission reliability within limits. If a specific bit error probability and a fixed hamming distance are assumed, the residual error rate increases with size of the telegram. A high reliability can be obtained if considerable effort is invested in the physical coding, so that the bit error rate or block error probability is reduced. If a constant hamming distance is assumed, this results in a reduction of the residual error probability. A low residual 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 SIMATIC EWA 4NEB 710 6075-02a 1-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/sensor level Ethernet PROFIBUS/ MPI AS-Interface Management Level At the management level, supervisory tasks are processed which affect the entire works (management functions). These include storing process values as well as optimizing and analyzing processing functions as well as their output in the form of reports. The data required for these reports is collected 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 processed autonomously. 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 programmable controllers. The field devices measure, signal and transmit the commands from the cell level to the installations. Small data volumes are usually transferred. A hierarchic communication arrangement is typical for this level, i.e. several field devices communicate with one master. Introduction and Basics of Communication Communication with SIMATIC EWA 4NEB 710 6075-02a 1-27 Actuator/Sensor Level At this level, a master communicates with the actuators and sensors that are connected to a subnet. Its characteristic feature is a fast response time for a small number of data bits. Communication Services Communication with SIMATIC EWA 4NEB 710 6075-02a 2-1 2 Communication Services Overview In this Chapter, you will find out the types of communication services that are available and how they can be categorized in terms of performance. You will become familiar with the software interfaces for communication services that exist within SIMATIC. Chapter Overview In Section You will find On page 2.1 Introduction 2-2 2.2 S7 Functions 2-4 2.3 ISO Transport Services 2-6 2.4 ISO-on-TCP Services 2-7 2.5 PROFIBUS-FDL Services 2-8 2.6 PROFIBUS-FMS Services 2-9 2.7 PROFIBUS-DP Services 2-10 2.8 Global Data Communication (GD) 2-11 2.9 AS-i Services 2-12 Communication Services Communication with SIMATIC EWA 4NEB 710 6075-02a 2-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 services from now on) are offered via software interfaces in the data terminal (e.g. SIMATIC S7 system functions). A software interface does not necessarily offer all the communication functions of a service. Such a service can be provided in the respective data terminal (e.g. PLC, PC) with different software interfaces. Services and Subnets Communication in SIMATIC S7 is based on various subnets on which various services are provided. The following table shows the relationship between services and subnets. Services S7 communication functions (S7 functions) ISO transport ISO-on-TCP FDL (SDA) FMS DP GD Sub- nets Industrial Ethernet PROFIBUS MPI A summary of the communication services that are used in SIMATIC is given 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 integrated into every SIMATIC S7/M7 system. The S7 functions correspond to a service of the ISO application layer, so they are independent of the subnet and 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 layer of the ISO reference model) with Industrial Ethernet between SIMATIC S7 and SIMATIC S5. Communication Services Communication with SIMATIC EWA 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 4 in 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 SIMATIC S7 to SIMATIC S5. They are optimized for the transmission of medium data volumes (up to 240 bytes) via open communication on Layer 2 of the ISO reference model, fieldbus data link (FDL) with PROFIBUS. FMS PROFIBUS FMS (fieldbus message specification) offers services for the transmission of structured data (FMS variables). The FMS service can be placed in Layer 7 of the ISO reference model. It complies with the European standard EN 50170 Vol. 2 PROFIBUS and therefore 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 it was central I/O. This service complies with the European standard EN 50170 Vol. 2 PROFIBUS master/slave and therefore facilitates open communication to distributed I/O and field devices. GD Global data communication is a simple communication service that is integrated into the operating system of the S7-300/400 CPUs. GD communication facilitates cyclic data transfer between CPUs via the MPI interface. Cyclic data transfer takes place with the normal process image. 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 SIMATIC EWA 4NEB 710 6075-02a 2-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 integrated into every SIMATIC S7/M7 system. The S7 functions correspond to a service of the Application Layer (Layer 7 of the ISO reference model), so they 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 SIMATIC stations and program testing and diagnostics). Writing and reading variables as well as automatic transmission of data to the operator control and visualization stations (OPs and OSes) without the need for additional communication functions in the user program of the communication partner. Error-free transfer of an area or subarea of data blocks (up to 64 Kbytes), a bit memory area or the process image between SIMATIC S7/M7-400 stations. This means that data transfer is only completed when the receive function in the communication partner has loaded the data (BSEND/BRCV). High-speed data transfer without checking, independent of the time taken to process the communication function by the communication partner (e.g. operating and status signals). This means that the data can be overwritten with more up-to-date data at the communication partner (USEND/URCV). This is only possible between SIMATIC S7/M7-400 stations. Program controlled reading and writing of variables without the need for additional communication functions in the user program of the communication 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 the CPU of the communication partner. The software interfaces (see Chapter 4) to the user program constitute the communication SFCs/SFBs that are integral to the operating system. The data volume lies between 76 and 460 bytes (in the case of BSEND/BRCV up to 64 Kbytes). Communication Services Communication with SIMATIC EWA 4NEB 710 6075-02a 2-5 Transmission Reliability A high degree of data security is achieved due to automatic repetition of incomplete 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 partner on Layer 7 of the ISO reference model. This is indicated in the appropriate block. Integration in STEP 7 The SIMATIC S7 family, together with the S7 functions offers communica- tion functions via configured and non-configured S7 links. The configured links are configured using STEP 7 and are implicitly established when the station starts up. The non-configured links are explicitly established when the associated communication function is called. Assignment to Software Interface In SIMATIC S7-300/400 systems, the S7 functions are provided by the communication SFCs for non-configured links and the communication SFBs for configured links. In SIMATIC M7-300/400 systems, the functional scope of the S7 functions is 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 SIMATIC EWA 4NEB 710 6075-02a 2-6 2.3 ISO Transport Services Overview ISO transport provides services for transmitting data via links. The link is automatically monitored by the ISO transport service. The ISO transport service (ISO 8073 Class 4) corresponds to Level 4 of the ISO reference model. Features Large quantities of data can be transmitted using the ISO transport service due to "data blocking", i.e. useful data can be segmented in several data telegrams. The ISO transport service facilitates communication to any communica- tion partner (e.g. SIMATIC S5 or PC) that supports sending and receiving data in accordance with ISO transport. Data is only transferred on Industrial Ethernet with the ISO transport serv- ice. Transmission Reliability A high degree of data security is achieved due to automatic repetition in the 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 in STEP 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 to Software Interface In SIMATIC S7, the ISO transport services are used for communication with 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 SIMATIC EWA 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 extended RFC 1006 in accordance with Layer 4 of the ISO reference model. RFC 1006 is required because TCP provides data stream communication without blocking the data into messages. This behavior is rectified in the case of the ISO protocol of Layer 4 with an end of message code (EOM). The EOM allows messages (data blocks) to be transmitted. TCP/IP does not recognize this. Additive protocols have to used for the purposes of sending messages. RFC 1006 describes how the services of ISO layer 4 can be mapped onto TCP. RFC 1006 is an official standard and is used by many manufacturers. Features The ISO-on-TCP service facilitates communication to any communication partner (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. Transmission Reliability A high degree of data security is achieved due to automatic repetition and additional block checking mechanisms (CRC check on Layer 2). Receipt of data is acknowledged by the communication partner. This is indicated in the appropriate block. Integration in STEP 7 With the ISO-on-TCP services, the SIMATIC S7 offers communication functions for sending and receiving data via static links. The associated ISO-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 to Software Interface In SIMATIC S7, the ISO-on-TCP services are used for communication with 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 SIMATIC EWA 4NEB 710 6075-02a 2-8 2.5 PROFIBUS-FDL Services Overview FDL (fieldbus data link) offers services for the transmission of data on the PROFIBUS subnet. The FDL service of SIMATIC S7 supports the SDA function (send data with 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. 2 PROFIBUS. Features Receipt of data is acknowledged by the FDL service of the communication partner. 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. Transmission Reliability A high degree of data security is achieved due to automatic repetition and additional checking mechanisms (parity bit per character and check sum on Layer 2). Integration in STEP 7 With the FDL service, the SIMATIC S7 offers, communication functions for sending and receiving data via static links. The associated FDL links are configured using STEP 7. They are established implicitly when the PROFIBUS-CP for SIMATIC S7 starts up. The STEP 7 "NCM S7 for PROFIBUS" option package supplements the STEP 7 link configuration with the link type "FDL link". Assignment to Software Interface In SIMATIC S7, the FDL services are used for communication with the blocks AG_SEND and AG_RECV via the PROFIBUS subnet (see Chapter 4). On the PC, the FDL services are provided in the form of C functions. Communication Services Communication with SIMATIC EWA 4NEB 710 6075-02a 2-9 2.6 PROFIBUS-FMS Services Overview PROFIBUS-FMS (fieldbus message specification) offers services for the transmission of structured data (FMS variables). The FMS service can be placed in Layer 7 of the ISO reference model. It complies with the European standard EN 50170 Vol. 2 PROFIBUS and therefore 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 communication partner has received the data correctly. Data is only transferred with the FMS service on the PROFIBUS subnet. Transmission Reliability A high degree of data security is achieved due to automatic repetition and additional checking mechanisms (parity bit per character and check sum on Layer 2). Integration in STEP 7 With the FMS service, the SIMATIC S7 offers communication functions for sending and receiving data via static links. The associated FMS links are configured using STEP 7. They are established implicitly when the station for SIMATIC S7 starts up. The STEP 7 "NCM S7 for PROFIBUS" option package supplements the STEP 7 link configuration with the link type "FMS link". Assignment to Software Interface In SIMATIC S7, the FMS services are used for communication with the communication 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 SIMATIC EWA 4NEB 710 6075-02a 2-10 2.7 PROFIBUS-DP Services Overview PROFIBUS-DP services facilitate direct communication with distributed I/O. From the control program, distributed I/O is addressed as if it were central I/O. PROFIBUS-DP services comply with the European standard EN 50170 Vol. 2, PROFIBUS. Any standard slave can be connected. Features The "distributed I/O" expands the central I/O with I/O modules that are connected to a central controller via a parallel bus (via an IM) or a serial bus (interface on CPU, IM or CP). The serial bus is PROFIBUS-DP which covers open communication up to Layer 7. The PROFIBUS-DP interface is either integrated on the S7/M7 CPUs or separate 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 manner as any other I/O in the central controller or in an expansion unit. This means that the I/O modules can be directly addressed using instructions or they are accessed via process image transfer. Transmission Reliability A high degree of data security is achieved due to automatic repetition and additional checking mechanisms (parity bit per character and check sum on Layer 2). Integration in STEP 7 Distributed I/O is configured using the hardware configuration functions of STEP 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 SIMATIC EWA 4NEB 710 6075-02a 2-11 2.8 Global Data Communication (GD) Overview Global data communication is a simple communication service that is integral to the operating system of the S7-300/400 CPUs. Features GD communication facilitates the cyclic exchange of global data, such as inputs, outputs, bit memories and areas in data blocks, between CPUs via the MPI interface (without using blocks). Cyclic data transfer takes place with the normal transfer of the process image. The response time is dependent on the cycle of the user program and its value is a fraction of this cycle time (GD reduction factor). Transmission Reliability This technique is a broadcast technique; therefore, there is no guarantee for data security. Integration in STEP 7 Global data communication is configured with STEP 7 via a global data table. All S7-300/400 CPUs must be located in the same STEP 7 project. Communication Services Communication with SIMATIC EWA 4NEB 710 6075-02a 2-12 2.9 AS-i Services Overview AS-i services facilitate direct communication with decentralized actuators and sensors. From the control program, they are addressed as if they were distributed I/O. The AS-i specification has been submitted in the form of a prototype standard 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 the sensors and actuators can be directly addressed with instructions or they can 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 <= 5 ms. The AS-i interface is available as a separate interface (CP) for SIMATIC S7-200/300 and M7 300. Transmission Reliability A high degree of data security is achieved due to automatic repetition and additional checking mechanisms (parity bit and a special signal shape). Integration in STEP 7 As far as configuration is concerned, the CP is simply integrated during hardware configuration. Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-1 3 Communication Networks Overview In this Chapter, you will become familiar with the communication networks that are available for SIMATIC. You will learn which protocols are realized in which network and which SIMATIC products are offered for these communication networks. On the basis of this information, you will be able to select your own communication network. Chapter Overview In Section You will find On page 3.1 Overview 3-2 3.2 Multipoint Interface (MPI) 3-5 3.3 PROFIBUS 3-7 3.4 Industrial Ethernet 3-12 3.5 Point-to-Point Link 3-14 3.6 AS-Interface 3-16 Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-2 3.1 Overview Subnets in SIMATIC SIMATIC offers the following subnets which meet the requirements of the different automation system levels (management, cell, field and actua- tor/sensor level): MPI The MPI subnet meets the requirements of the field level and cell level with low coverage. MPI is a multipoint interface in SIMATIC S7/M7 and C7 systems. It is designed as a programming device interface and is intended for networking a small number of CPUs for the purpose of exchanging small 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 small volumes of data PROFIBUS, in the cell, for the high-speed exchange of medium- sized quantities of data with communication partners that have equal rights Industrial Ethernet Industrial Ethernet is the network for the management and cell level in the open, multi-vendor SIMATIC communication system. Industrial Ethernet is suitable for the high-speed exchange of large quantities of data and facili- tates communication between one site and another via gateways. Point-to-Point Link A point-to-point link is not technically a subnet. In SIMATIC, this link is implemented via point-to-point communication processors (CP), whereby two stations are linked together. AS-Interface The AS-Interface or actuator/sensor interface is a subnet system for the lowest process level in automation systems. It is specially designed for the interconnection of binary sensors and actuators. The data volume is lim- ited to 4 bits per slave station. Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-3 Access Technique The access technique specifies how and when a station can send its data on the subnet. In the event of simultaneous requests to send from different stations, it controls the access authorization. The following types of access techniques exist: CSMA/CD (carrier sense multiple access / collision detection) Token passing Master/slave The access techniques are described in detail in the sections describing the relevant subnets. Max. Length of Network This is the greatest distance between two stations of a subnet. A subnet can comprise one or more segments (bus segments). Bus segments can be 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 SIMATIC EWA 4NEB 710 6075-02a 3-4 Technical Data The following table provides an overview of the subnets. Features MPI PROFIBUS Industrial Ethernet AS-Interface Standards SIEMENS pro- cedure PROFIBUS to EN 50170 Volume 2 Ethernet to IEEE 802.3 AS-i specification to IEC TG 17B Access technique Token passing Token passing with subordinate master/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-core cable Fiber-optic: Glass or plastic fiber-optic cable Copper: Shielded 2-core cable Fiber-optic: Glass or plastic fiber-optic cable Copper: Double-shielded coaxial cable or Industrial Twisted Pair Fiber-optic: Glass fiber-optic cables Copper: Unshielded 2-core cable Max. no. of stations 32 127 > 1000 32 Max. length of network 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 system level Cell and field level Cell and field level Management and cell level Actuator/sensor level Hamming distance 4 4 2 - 1) Depends on transmission rate 2) Depends on OLM type used Communication Networks Communication with SIMATIC EWA 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 is designed as a programming device interface and is intended for network- ing a small number of CPUs. MPI S7 - 300 S7 - 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 small data volumes. Global data communication offers a simple, configurable communi- cation service. Several CPUs and programming devices/OPs can be connected. Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-6 Technical Data Standards SIEMENS-specific Stations Maximum of 32 active stations Access technique Token passing Transmission rate 187.5 Kbit/s. Transfer medium Shielded 2-core cable, fiber-optic (glass or plastic) Max. length of network Segment length 50 m, via RS 485 repeaters up to 1100 m, with fiber-optic cables via OLM > 100 km Topology Line, tree, star, ring Services S7 functions Global data communication SIMATIC Products System Modules Services S7-300 CPU 312 IFM CPU 313 CPU 314, CPU 314 IFM CPU 315 CPU 315-2 DP S7 functions, GD S7 functions, GD S7 functions, GD S7 functions, GD S7 functions, GD, DP S7-400 CPU 412-1 CPU 413-1 CPU 414-1 CPU 416-1 CPU 413-2 DP CPU 414-2 DP CPU 416-2 DP S7 functions, GD S7 functions, GD S7 functions, GD S7 functions, GD S7 functions, GD, DP S7 functions, GD, DP S7 functions, GD, DP M7-300 CPU 388-4 S7 functions M7-400 CPU 488-4 CPU 488-5 S7 functions S7 functions C7-620 C7-623/624 C7-626 C7-626-2DP S7 functions, GD S7 functions, GD S7 functions, GD, DP Programming device PG 720, PG 720C PG 740 PG 760 S7 functions S7 functions S7 functions OP OP 3, OP 5, OP 7, OP 15, OP 17; OP 25, OP 35, OP 37 S7 functions S7 functions S7 functions PC CP 5412-A2 (ISA) CP 5411 (ISA) CP 5511 (PCMCIA) MPI card (ISA) CP 5611 (PCI) S7 functions S7 functions S7 functions S7 functions S7 functions More products are listed in Catalogs ST 70 and IK 10. Communication Networks Communication with SIMATIC EWA 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 a copper cable network based on a shielded 2-core cable or a fiber-optic cable network. Access technique The network access technique for PROFIBUS corresponds to the "Token bus" 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-2 shows the procedure used with active and passive stations. This is ex- plained briefly below: All active stations (masters) form, in a prespecified sequence, the "logical token ring" whereby each active station is aware of the other active sta- tions and their sequence in the logical ring (the sequence is independent of the topological arrangement of the active stations on the bus). The right to access the medium (the "token") is passed from active station to active station in accordance with the sequence specified by the logical ring. When a station receives the token (addressed to it), it has permission to send telegrams. The time allowed is specified by the so-called token holding time. Once this has elapsed, the station is only permitted to send one more high-priority message. If the station is not waiting to send a message, 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 Slave Slave Slave Slave Master Master Master Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-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 under operating conditions. Applications for PROFIBUS The PROFIBUS subnet for the cell and field level supports the exchange of information between field devices and with systems at a higher system level. It is used to transfer small to medium quantities of data. In SIMATIC S7, a CP is always required for PROFIBUS. PROFIBUS S7 - 300 S5 with PROFIBUS-CP PG OP S7 - 400 PROFIBUS-CP PROFIBUS-CP PROFIBUS-CP Figure 3-3: Example of a PROFIBUS Subnet Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-9 Applications for PROFIBUS-DP PROFIBUS-DP offers a standardized interface for the transfer of process input and process output data between SIMATIC S7 stations and field devices (DP slaves). PROFIBUS-DP is characterized by high-speed, cy- clic exchange of small quantities of data between DP masters and DP slaves. DP master PROFIBUS DP master PG/PC e.g. AG 95U/DP slave DP slave CP Non-Siemens DP slave S7 - 315-2 DP S7 - 300 PROFIBUS-CP STEP 7 NCM S7 for PROFIBUS e.g. ET 200 M/U/B PROFIBUS-CP OP Figure 3-4: Example of a PROFIBUS-DP Subnet Features of PROFIBUS The following services can be used simultaneously on PROFIBUS FDL, FMS and S7 functions or DP, FDL and S7 functions. Defined bus circulation times are guaranteed by the token passing technique. PROFIBUS-DP allows data to be exchanged between master and slave stations from different manufacturers without the need for special adaptation of the interface. In SIMATIC S7/M7, PROFIBUS-DP interfaces have been integrated into the CPUs (second interface for S7 CPUs or interface submod- ule for M7 CPUs). To the customer, this means: the single-master with integrated interface guarantees faster re- sponse times (1 to 2 ms for 12 Mbit/s). integrated interfaces are less expensive than separate interfaces and consume less space. Extremely fast response (1 to 5 ms) on querying DP slaves. PROFIBUS allows data to be exchanged between stations via FMS or FDL without the need for special adaptation of the interface. Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-10 Technical Data Standards EN 50170 Volume 2 PROFIBUS Stations Maximum of 127 stations in the network Access techniques - Token bus for bus allocation among active sta- tions. - Master/slave for communication with passive sta- tions. Transmission rate 9.6 Kbit/s to 12 Mbit/s Transfer medium Shielded 2-core cable or fiber-optic cable Transmission rate Length Copper: Per segment 9.6 to 93.75 Kbit/s 1000 m 187.5 Kbit/s 800 m 500 Kbit/s 400 m 1.5 Mbit/s 200 m 3 to 12 Mbit/s 100 m With repeaters 9.6 to 93.75 Kbit/s 10 km 187.5 Kbit/s 8 km 500 Kbit/s 4 km 1.5 Mbit/s 2 km 3 to 12 Mbit/s 1 km Fiber-optic: (depending on type of OLM used) 9.6 Kbit/s to 12 Mbit/s >100km Topology Line, tree, star, ring Services S7 functions FDL FMS DP Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-11 SIMATIC Products System Modules Services S5 95U CPU 95U FDL, DP (M or S) *) S5 115/135/ 155U CP 5431 IM 308-B/C FMS, FDL, DP (M) DP (M or S) S7-200 CPU 215 DP (S) S7-300 CPU 315-2 DP CP 342-5 CP 343-5 DP (M or S) S7 functions, FDL, DP (M or S) S7 functions, FDL, FMS S7-400 CPU 413-2 DP CPU 414-2 DP CPU 416-2 DP IM 467 CP 443-5 Basic CP 443-5 Extended DP (M) DP (M) DP (M) DP (M or S), (M and S) S7 functions, FDL, FMS S7 functions, FDL, DP (M or S) M7-300/400 IFM submodule S7 functions, DP (M or S) C7 CPU 626-DP DP OP OP 5, OP 7, OP 15, OP 17; OP 25, OP 35, OP 37 S7 functions S7 functions S7 functions PC/ program- ming device CP 5412 A2 (ISA) CP 5411 (ISA) CP 5511 (PCMCIA) CP 5611 (PCI) S7 functions, FDL, FMS, DP(M) *) S7 functions, FDL, DP (M) *) S7 functions, FDL, DP (M) *) S7 functions *) Depends on configuration ordered M = Master S = Slave More products are listed in Catalogs ST 50, ST 70 and IK 10 Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-12 3.4 Industrial Ethernet Applications Industrial Ethernet is a subnet for the management level and the cell level that supports communication between computers and programmable con- trollers. It is used for the transmission of large quantities of data and can be used for transmission over large distances. Physically, Ethernet is a copper cable network based on a shielded coaxial cable, a twisted-pair cable, or a fiber-optic network. Industrial Ethernet PC with Ethernet-CP HMI / control STEP 7 NCM S7 S7 - 300 with Ethernet-CP PG with Ethernet-CP S7 - 400 with Ethernet-CP M7 with Ethernet-CP S5 with Ethernet-CP Figure 3-5: Example of an Industrial Ethernet Subnet Access technique The CSMA/CD access technique is used. Before transmission, each sta- tion checks whether other stations are currently transmitting. If no other station is transmitting, it can start sending immediately. If a collision oc- curs due to two stations starting to transmit simultaneously, they both stop transmitting and repeat the procedure once a random waiting time has elapsed. Features In the case of Industrial Ethernet, the ISO and TCP/IP protocols are used. Due to the access technique used, all stations on Industrial Ethernet have equal rights. A large variety of non-Siemens systems can be accessed via ISO transport or ISO-on-TCP. Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-13 Technical Data Standards IEEE 802.3 Stations More than 1000 Access technique CSMA/CD (carrier sense multiple access/collision detection) Transmission rate 10 Mbit/s Transfer medium Copper: 2-core, shielded coaxial cable Industrial Twisted Pair Fiber-optic: Fiber-optic cable Max. length of network Copper: 1.5 km Fiber-optic: 4.5 km Topology Line, tree, star, ring Services S7 functions ISO transport ISO-on-TCP SIMATIC Products System Modules Services S5 115/135/155U CP 1430 CP 1430 TCP ISO transport ISO-on-TCP S7-300 CP 343-1 CP 343-1 TCP S7 functions, ISO transport S7 functions, ISO-on-TCP S7-400 CP 443-1 CP 443-1 TCP S7 functions, ISO transport S7 functions, ISO-on-TCP PC / programming device CP 1413 (ISA) CP 1411 (ISA) CP 1511 (PCMCIA) S7 functions, ISO transport, ISO-on-TCP S7 functions, ISO transport, ISO-on-TCP S7 functions, ISO transport, ISO-on-TCP Further products are listed in Catalogs ST 50, ST 70 and IK 10 Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-14 3.5 Point-to-Point Link Applications A point-to-point link allows data to be exchanged via a serial link. The point-to-point link can be used between your system and other program- mable controllers, computers or non-Siemens systems with communica- tion capability. A point-to-point link is not classified as a subnet. PC S7 - 400 with point-to-point CP Figure 3-6: Example of a Point-to-Point Link Features Adaptation to the protocol of the communication partner with the aid of standard procedures or loadable special drivers. A customized procedure can be defined using ASCII characters. Technical Data Stations 2 Transfer medium Serial interface-specific cable Physical interfaces RS 232C (V24) 20 mA (TTY) RS 422/485 Transmission rates From 300 bit/s to max. 76.8 Kbit/s with RS 232C and RS 422/485 max. 19.2 Kbit/s with 20 mA Max. length of network 10 m with RS 232C 1000 m with 20 mA and 9.6 Kbit/s 1200 m with RS 422/485 and 19,200 Kbit/s Protocol drivers ASCII driver 3964 (R) RK 512 Printer driver Loadable special drivers Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-15 SIMATIC Products System Modules Procedures / Drivers S5 95/100U CP 521 3964 (R), ASCII S5 115/135/155U CP 523 CP 524/525 CP 544 CP 544 B 3964 (R), ASCII 3964 (R), RK 512, ASCII, loadable special drivers 3964 (R), RK 512, ASCII 3964 (R), RK 512, ASCII, loadable special drivers S7-300 CP 340-RS 232C CP 340-20mA CP 340-RS 422/485 3964 (R), ASCII 3964 (R), ASCII 3964 (R), ASCII S7-400 CP 441-1 CP 441-2 3964 (R), RK512, ASCII 3964 (R), RK512, ASCII, load- able special drivers M7-300/400 IFM submodule 3964 (R), RK512, ASCII, load- able special drivers Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-16 3.6 AS-Interface Applications The AS-Interface or actuator/sensor interface (abbreviated: AS-i) is a subnet for the lowest process level in automation systems. The simplest types of binary actuators and sensors are linked to an automation system station via the AS-i bus. SIMATIC S7 300 AS-i module AS-i module AS-Interface distributor Actuator / sensor AS-i Bus AS-Interface power supply CP 342-2 Figure 3-7: Example of an AS-i Subnet Access technique The AS-Interface is a so-called "Single-master system", i.e. only one master exists in each AS-i subnet that controls data transfer. It calls all slaves in sequence and reads or writes the data. Master/slave access with cyclic polling guarantees a defined response time. Features AS-Interface is optimized for interfacing to binary actuators and sen- sors. The AS-i bus is not simply dedicated to the transfer of data between sensors/actuators and the master, it also supplies power to the sensors. AS-i modules are available for 1 to 8 bits (channels) and are de- signed to the IP65 degree of protection. They are suitable for direct installation on the machine or equipment. No configuration is required before start-up. Slaves can be replaced without the need for configuration. The AS-i master conducts cyclic data transfer with up to 31 stations in less than 5 ms. Numerous devices (actuators/sensors) can be connected as a result of manufacturer-independent standardization. A power supply unit is required for supplying power via the bus. Communication Networks Communication with SIMATIC EWA 4NEB 710 6075-02a 3-17 AS-Interface is not a subnet within the context of STEP 7. Technical Data Standards AS-Interface specification to IEC TG 178 Stations 1 master and max. 31 slaves Access technique Master/slave access technique Transmission rate 167 Kbit/s Response time Max. 5 ms for 31 slaves Transfer medium Unshielded 2-core cable Max. length of network Cable length max. 300 m (with repeaters) Topology Line, tree Service AS-i functions SIMATIC Products System AS-i master SIMATIC S5: S5-90U / 95U / 100U, ET 200U S5-115U, S5-135U, S5-155U CP 2433 CP 2430 SIMATIC S7: S7-200 CP 242-2 SIMATIC S7: S7-300, ET 200X CP 342-2 CP 142-2 PC CP 2413 More products are listed in Catalog IK10. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-1 4 Communication Functions for S7-300/400 Description In this Chapter, you will find out about the communication functions of S7-300/400. In Section You will find On page 4.1 Introduction 4-2 4.2 Communication SFCs for Non-Configured S7 Links 4-3 4.3 Communication SFBs for Configured S7 Links 4-8 4.4 SEND/RECEIVE Interface 4-13 4.5 FMS Interface 4-15 4.6 Communication via Point-to-Point Links 4-18 Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-2 4.1 Introduction Definition Program-controlled communication allows you to explicitly define the functions required, i.e. the point in time, the quantity of data and the transmission technique, by calling a communication function in a user program. For the purposes of transferring data, appropriate communication func- tions are available on the S7-300/400 (SFCs, SFBs, loadable FC/FBs). The assignment of communication services to software interfaces in SIMATIC is shown in the following table together with the associated software packages. Program-Controlled Communication Services Software Interfaces Software Packages S7 functions Communication SFCs for non- configured S7 links STEP 7 Version 3.1 upwards Communication SFBs for con- figured S7 links STEP 7 Version 2.x upwards M7-API for configured and non-configured S7 links M7-SYS Version 2.0 (RMOS32) see Chapter 5 (see Chapter 6) SAPI-S7 for configured S7 links (only client functions) SAPI S7 for PCs (option package) ISO transport Loadable FCs of the SEND/RECEIVE interface via ISO transport links NCM S7 for Industrial Ethernet (option pack- age) ISO-on-TCP Loadable FCs of the SEND/RECEIVE interface via ISO-on-TCP links NCM S7 for Industrial Ethernet (option pack- age) FDL (SDA) Loadable FCs of the SEND/RECEIVE interface via FDL links NCM S7 for PROFIBUS (option package) FMS Loadable FBs of the open interface via FMS links NCM S7 for PROFIBUS (option package) Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-3 4.2 Communication SFCs for Non-Configured S7 Links Overview These communication SFCs can be used on all S7-300/400 CPUs and support the exchange of data with S7/M7-300/400 CPUs. These functions support the transfer of small quantities of data (max. 76 bytes) via the MPI subnet or within an S7 station. It is not necessary to configure links. Links When a communication SFC is called, a link to the addressed communi- cation partner is dynamically established and depending on the parame- terization is removed on completion of the data transmission. For this pur- pose, one spare link resource is required in each communication partner. Link Resources If no spare resources are available on the communication partner, a new link cannot be established (temporary resource shortage, SFC error class in RET_VAL). The communication SFCs must not be deleted in the RUN operating state, otherwise any reserved resources cannot be released (only modify program in the STOP state). Blocks The communication SFCs do not require any additional user memory (e.g. due to instance data blocks). The SFCs can be parameterized, i.e. the block parameters can be modi- fied dynamically during program execution. This function allows for ex- ample, different communication partners to be accessed via an SFC. On the server side, no SFCs are necessary in the user program for certain functions because these communication functions are already processed by the operating system. Size of Useful Data For all S7/M7/C7 CPUs, the size of useful data that can be transmitted is 76 bytes maximum. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-4 4.2.1 Communication via MPI Subnets Features The communication SFCs offer you acknowledged data transmission via non-configured S7 links. You can access all communication partners on the MPI subnet with these communication SFCs. From the S7-300/400 CPUs, variables in an S7 215 CPU can also be ac- cessed (X_PUT/X_GET). The links to the communication partners are dynamically established when the SFCs are called. For this purpose, one spare link resource is required in each communication partner. An unlimited number of communication partners can be accessed in se- quence on the MPI subnet. Communication is also possible when the communication partners are located in other S7 projects. Blocks The following SFCs are available for this purpose (see STEP 7 documen- tation): Block Description SFC 65 SFC 66 X_SEND X_RCV Error-free transfer of a data block to a communica- tion partner, i.e. data transmission is complete only when the receive function (X_RCV) in the commu- nication partner has loaded the data. SFC 67 X_GET This SFC can be used to read a variable from a communication partner without you having to place a corresponding SFC in the communication partner. This function is provided in the communication partner by the operating system. SFC 68 X_PUT This SFC can be used to write a variable to a communication partner without you having to place a corresponding SFC in the communication partner. This function is provided in the communication partner by the operating system. SFC 69 X_ABORT This SFC can be used to abort an existing link ex- plicitly without having to transfer data. This allows the corresponding link resources to be released again on both sides. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-5 Addressing The communication partners are addressed in the case of the blocks listed above via the MPI address that is configured using STEP 7. The communication partner can also be located in another S7 project. Data Consistency This is the maximum data area that can be read or written as a continuous block by the operating system (X_PUT/X_GET) in the case of S7-300/400 CPUs. An array of the data types byte, word and double-word can be transferred consistently up to a maximum CPU-specific length as follows: CPU 31x CPU 412 CPU 413 CPU 414 CPU 416 8 bytes 32 bytes 32 bytes 32 bytes 32 bytes If larger quantities of useful data are transferred using X_PUT/X_GET, inconsistencies can occur. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-6 4.2.2 Communication Within an S7 Station Features The communication SFCs offer you acknowledged data transmission via non-configured S7 links. You can access all communication partners that can be addressed via the I/O addresses of a station (e.g. FM modules) with these communication SFCs. The links to the communication partners are dynamically established when the SFCs are called. For this purpose, one spare link resource is required in each communication partner. The number of communication partners that can be accessed in sequence within the station is not limited. Blocks The following SFCs are available for this purpose (see STEP 7 documen- tation): Block Description SFC 72 I_GET This SFC can be used to read a variable from a communication partner without you having to place a corresponding SFC in the communication partner. These functions are provided by the operating sys- tem of the communication partner. SFC 73 I_PUT This SFC can be used to write a variable to a communication partner without you having to place a corresponding SFC in the communication partner. These functions are provided by the operating sys- tem of the communication partner. SFC 74 I_ABORT This SFC can be used to abort an existing link to a communication partner without having to transfer variables. This allows the corresponding link re- sources to be released again on both sides. Addressing The communication partners are addressed in the case of the blocks listed above via the module start address (I/O address) that is configured using STEP 7. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-7 Data Consistency This is the maximum data area that can be read or written as a continuous block by the operating system (I_PUT/I_GET) in the case of S7-300/400 CPUs. An array of the data types byte, word and double-word can be transferred consistently up to a maximum CPU-specific length as follows: CPU 31x CPU 412 CPU 413 CPU 414 CPU 416 8 bytes 32 bytes 32 bytes 32 bytes 32 bytes If larger quantities of useful data are transferred using I_PUT/I_GET, in- consistencies can occur. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-8 4.3 Communication SFBs for Configured S7 Links Overview You can use these SFBs on all S7-400 CPUs. They support the exchange of data with S7/M7-300/400 CPUs. These functions can be used to trans- fer up to 64 Kbytes of data via the MPI, PROFIBUS and Industrial Ether- net subnets. Features The communication SFBs offer you acknowledged data transmission via configured S7 links. These links are set up using STEP 7. The communication SFBs can only be used on CPUs of the S7-400 fam- ily. Data can only be read from or written to S7-300 CPUs (PUT/GET). The communication functions are not limited to data transfer, additional functions can be used to control and monitor the communication partner. Communication is only possible within an S7 project. The communication partners must be connected to the same subnet. Links S7 links configured using STEP 7 are required for the communication SFBs. These links are established on initial start of the stations and remain es- tablished permanently, even when the station switches to the STOP state. When a station restarts (warm), the links are not established anew. Blocks These communication SFBs are integral to the operating system of the S7-400 CPUs. The communication SFBs require instance DBs (program memory space) for the current parameters and the static data. On the server side, no SFBs are required in the user program for the PUT and GET functions because these functions are already processed by the operating system. Subnets To be accessible, the communication partners must be connected to a common MPI subnet, PROFIBUS subnet or Industrial Ethernet. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-9 Size of Useful Data The maximum size of useful data that can be transferred depends on the type of block used and the communication partner. Block S7-400 to S7-300 (server) S7-400 to S7-400 S7-400 to M7-300/400 PUT/GET 160 bytes 1) 400 bytes 1) USEND/URCV - 440 bytes 1) BSEND/BRCV - 64 Kbytes 1) This is the total size of the useful data for an SFB with 1 to 4 variables. Function Classes The communication SFBs can be categorized as follows: Send and receive functions Control functions Monitoring functions Query functions Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-10 Send and Receive Functions You can use these communication SFBs to transfer data between two communication partners. The following SFBs (see STEP 7 documentation) are available: Block Description SFB 8 SFB 9 USEND URCV High-speed transfer of data without checking, inde- pendent of the time taken to process the communi- cation function (URCV) by the communication part- ner (e.g. operating and maintenance signals). This means that the data can be overwritten with more up-to-date data at the communication partner. SFB 12 SFB 13 BSEND BRCV Error-free transfer of a data block to a communica- tion partner, i.e. data transmission is complete only when the receive function (BRCV) in the communi- cation partner has loaded the data. SFB 14 GET Program-controlled reading of variables without the need for additional communication functions in the user program of the communication partner. SFB 15 PUT Program-controlled writing of variables without the need for additional communication functions in the user program of the communication partner. Data Consistency In the case of S7-300/400 CPUs, this is the maximum data area that can be read or written as a continuous block by the operating system (e.g. PUT/GET). An array of the data types byte, word and double-word can be transferred consistently up to a maximum CPU-specific length as follows: CPU 31x CPU 412 CPU 413 CPU 414 CPU 416 8 bytes 32 bytes 32 bytes 32 bytes 32 bytes If larger quantities of useful data are transferred using PUT/GET, incon- sistencies can occur. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-11 Control Functions Using these communication SFBs, you can control the operating status of a communication partner. Block Description SFB 19 START This triggers a complete restart for an S7/M7-300/400 CPU when it is in the STOP state. SFB 20 STOP This stops an S7/M7-300/400 CPU when it is in the RUN, HALT or start-up state. SFB 21 RESUME This triggers a warm restart for an S7-400 CPU when it is in the STOP state. Monitoring Functions Using these communication SFBs, you can obtain information about the operating status of a communication partner. Block Description SFB 22 STATUS Outputs the operating status of a communication partner (S7-300/400 CPU) in response to a user program request. SFB 23 USTATUS This receives the operating status of an S7-400 CPU on status change, provided that the appropri- ate link attribute (operating status signals for send) is set. Query Function You can use this function to query the internal status of the local commu- nication SFB and the associated link in the program. Block Description SFC 62 CONTROL Queries the status of a link. Addressing The communication partner is addressed via the local link end point (local ID). The local ID is generated by STEP 7 when the link is configured. The communication partners must be within an S7 project. The local ID is only loaded when the communication SFB is initially called and remains valid until the next complete restart. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-12 Parallel Arrangement of Communication SFBs Several communication SFBs can be executed simultaneously and bidi- rectionally via a link. This is possible with the communication SFBs BSEND/BRCV and USEND/URCV. Using R_ID (block parameter) you can allocate a send and receive SFB to the same link (same value in each case for R_ID). Figure 4-1: Several Communication SFBs via One Link SFB 13 R_ID=2 SFB 12 BSEND BRCV URCV BSEND R_ID=1 BRCV USEND SFB 8 PUT SFB 15 R_ID=3 SFB 12 R_ID=2 SFB 13 Link R_ID=1 ID ID SFB 9 R_ID=3 Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-13 4.4 SEND/RECEIVE Interface Overview The principle function of the SEND/RECEIVE interface is to link the SIMATIC S7 to the SIMATIC S5, as well as to other non-S7 stations (e.g. PCs). This interface is built up from the loadable blocks AG_SEND and AG_RECV for S7 or the handling blocks SEND and RECEIVE for S5. These communication functions support the transfer of medium quantities of data (up to 240 bytes). The SEND/RECEIVE interface permits data to be exchanged via: Industrial Ethernet (ISO transport, ISO-on-TCP) PROFIBUS (FDL) The typical response time for a data transmission using AG_SEND/AG_RECEIVE is 10 ms. Features The SEND/RECEIVE interface supports simple data transfer between two communication partners without an acknowledgement at the user program level via a link configured using STEP 7: From SIMATIC S7 to SIMATIC S5 From SIMATIC S7 to PC/programming device From SIMATIC S7 to non-Siemens systems From SIMATIC S7 to SIMATIC S7. Communication between stations in different STEP 7 projects is possible. Links Links configured using STEP 7 are required for the AG_SEND / AG_RECEIVE blocks. These links are established when the stations start up and remain estab- lished permanently, even when the CPU switches to the STOP state. When the CP is in the STOP state, all links are removed. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-14 Blocks For the purpose of processing the communication via links, two loadable FC blocks are available: Block Description FC 5 AG_SEND This sends data blocks via a configured link to a communication partner FC 6 AG_RECV This receives data blocks via a configured link from a communication partner You will find the loadable blocks in SIMATIC Manager, if you have in- stalled the appropriate NCM option package, as follows: Open file -> Library -> SIMATIC_NET_CP -> CP_300 or CP_400 -> blocks. Size of Useful Data The maximum size of useful data that can be transferred is limited to 240 bytes for all subnets. Data Consistency In SIMATIC S7, data up to a maximum length of 240 bytes can be trans- ferred consistently. Link Resources For each link, a link resource is required on the CP. STEP 7 checks during configuration whether sufficient link resources are available. Interrupt Response The communication FCs AG_SEND and AG_RECV cannot be interrupted by OBs of a higher priority and can in certain cases therefore cause the interrupt response time to be extended. Addressing The communication partner is addressed via the local link end point (local ID). The local ID is generated by STEP 7 when the link is configured. The communication partner can also be located within another S7 project. The local ID is only loaded when the communication FC is initially called and remains valid until the next complete restart. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-15 4.5 FMS Interface Overview The FMS interface (open communication on Layer 7 of the ISO reference model according to the PROFIBUS standard) is used principally to connect non-Siemens systems to PROFIBUS. Data volumes of up to 240 bytes can be transferred. The specific advantage of the FMS service is that the data structures are transferred in a neutral format and then converted in the communication partner. In the user programs of the stations, you can still use the respec- tive "programming language" regardless, e.g. STL for SIMATIC S7 and C for the PC applications. The FMS services comprise variable services for structured data (variables) and administration services. Features For open communication, there are special blocks on the SIMATIC S7 which support FMS services. The FMS interface supports simple data transfer between two communi- cation partners without an acknowledgement at the user program level via a link configured using STEP 7: From a SIMATIC S7 with PROFIBUS-CP From a SIMATIC S5 with PROFIBUS-CP From a PC/programming device with PROFIBUS-CP Non-Siemens systems that support FMS services. All global S7 variables such as bit memories, inputs, outputs and struc- tured DBs are mapped onto VMD/VFD-specific communication variables. These variables within a VMD are usually identified by names. Links FMS links configured using STEP 7 are required for the communication FBs. These FMS links are established when the stations start up and remain established permanently, even when the S7 CPU switches to the STOP state. When an S7 CPU restarts (warm), the links are not established anew. Blocks These communication functions for FMS are implemented for the client in the form of loadable function blocks (FBs) for the S7-300/400 family. The communication FBs require instance DBs (program memory space) for the current parameters and the static data. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-16 On the server side, no blocks are required by the user program. The server functions are provided by the CP with the communication functions that are integrated in the operating system of the CPU. Block Description FB 3 READ This FB can be used to read a variable from a communication partner without you having to place a corresponding FB in the communication partner. This function is provided in the com- munication partner by the operating system. FB 6 WRITE This FB can be used to write a variable to a communication partner without you having to place a corresponding FB in the communication partner. This function is provided in the com- munication partner by the operating system. FB 4 REPORT For sending a structured variable to the com- munication partner without acknowledgement. FB 2 IDENTIFY For reading the identification of a non-Siemens system. FB 5 STATUS For reading the status of a remote device on user request. FB 1 ACCESS For temporarily inhibiting data access on the server side for other applications during program processing. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-17 Size of Useful Data The maximum size of useful data that can be transferred depends on the type of block used. Block Size of Useful Data READ 237 bytes WRITE 233 bytes REPORT 233 bytes Addressing The communication partner is addressed via the local link end point (local ID). The local ID is generated by STEP 7 when the link is configured. The communication partner does not have to be located within the same S7 project. The local ID is only loaded when the communication FB is initially called and remains valid until the next complete restart. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-18 4.6 Communication via Point-to-Point Links Overview A point-to-point link facilitates data transfer via a serial link. The point-to- point link can be used between your system and other programmable con- trollers, computers or non-Siemens systems with communication capabil- ity. A point-to-point link is not classified as a subnet. Communication via a point-to-point link is not identical for S7-300 and S7-400. Links A point-to-point link configured using STEP 7 is required for the commu- nication SFBs. This link is only connected between the CPU and CP. Features Using the point-to-point CP for the S7-300/400, you can link to all com- munication partners that can handle the 3964(R), RK 512 or ASCII proce- dures or special drivers. With the standard procedures and the loadable special drivers, you can adapt your system to the procedures of the communication partner or you can write your own procedure using ASCII characters. The point-to-point link can be used to transfer up to 4 Kbytes of data at medium speed. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-19 Blocks for S7-400 A subset of the communication SFBs forms the software interface be- tween the S7-400 CPU and the CP 441. The communication SFBs that you can use are listed in the following ta- ble: Block Description SFB 12 SFB 13 BSEND BRCV A data block is transferred to the communication partner. The point-to-point CP acknowledges re- ceipt of the data. SFB 14 GET Data is read (max. 400 bytes) from an S7-400 communication partner. SFB 15 PUT Data is written (max. 400 bytes) to an S7-400 communication partner. SFB 16 PRINT A message containing up to four variables is transferred to a printer. SFB 22 STATUS The status of the CPs and the RS 232 interface is output. Addressing You must load the local ID from the STEP 7 link configuration for a point- to-point link. This ensures that you only address the point-to-point CP and not the communication partner. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-20 Blocks for S7-300 The function blocks and functions of the CP340 are listed in the following table together with a description. Blocks Description FB 2 FB 3 P_RCV P_SEND A data block is transferred to the communication partner. The point-to-point CP acknowledges receipt of the data. FB 4 P_PRINT A message containing up to four variables is trans- ferred to a printer. FC 5 V24_STAT The signal status is output to the RS 232C interface of the CP 340-RS 232C. FC 6 V24_SET The outputs on the RS 232C interface of the CP 340- RS 232C are set/reset. Addressing Addressing is via the local address (LADDR). 3964(R) Procedure 3964(R) is a procedure that can be positioned in Layer 2 (data link layer) of the ISO reference model. The 3964 procedure operates without a block check character and 3964R operates with a block check character. 3964(R) guarantees a high degree of transmission reliability on the trans- mission cable. This reliability is achieved as a result of a specified proce- dure for creating and removing telegrams and by the inclusion of a block check character (BCC) on transfer. The hamming distance for 3964(R) is 3. Performance limits Further processing of the send/receive data in the program of the com- munication partner is not guaranteed. An acknowledgement mechanism must be programmed in the user program for this purpose. RK512 Procedure RK512 is a procedure that can be positioned in Layer 4 (transport layer) of the ISO reference model. The RK512 procedure guarantees a high degree of transmission reliability on the transmission cable, because the 3964(R) procedure is used in RK512 for transporting data. The hamming distance for RK512 is 4. Further processing in the communication partner is guaranteed because the RK512 interpreter evaluates the length parameter in the header and after the data has been stored in the target area of the communication partner, an acknowledgement telegram is generated that reports whether data transport was successful or not. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-21 The RK512 driver ensures that the 3964(R) procedure is used correctly, that the length parameter is correctly evaluated or entered and that the response telegram is generated. ASCII Procedure ASCII is a procedure that can be positioned in Layer 1 (physical layer) of the ISO reference model. You can use this facility to freely define a procedure using ASCII charac- ters. Transmission reliability Data transfer with the ASCII driver is extremely efficient but the safe transport of data is not guaranteed. Only one parity bit is used. If a bit is incorrectly transferred within a character, this is detected via the parity bit and rectified. If more than one bit is wrongly transferred, it is no longer possible to detect the error. The transmission reliability can be enhanced by implementing a length parameter and a check sum for the telegram in the user program. If acknowledgement telegrams are implemented (user program), data security can be improved still further. Special Drivers Additional special drivers for special applications are offered for the CPs; they can be loaded onto the CP. Communication Functions for S7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 4-22 Communication Functions for M7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 5-1 5 Communication Functions for M7-300/400 Definition The M7API (application programming interface) is part of the M7-300/400 system software. It offers the functions required for communicating with SIMATIC systems in the form of a C interface. Chapter Overview In Section You will find On page 5.1 Communication Functions for Non-Configured S7 Links 5-2 5.2 Communication Functions for Configured S7 Links 5-5 Communication Functions for M7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 5-2 5.1 Communication Functions for Non-Configured S7 Links Overview The function calls for non-configured links can be used to exchange data between an M7 CPU/FM and another module with communication capa- bility, provided the communication partners are connected to a common MPI subnet or are located in the same M7/S7 station. Communication beyond the boundaries of the subnet is not possible with the function calls for non-configured links. Links These functions can be used to transfer small quantities of data (max. 76 bytes). The number of communication partners that can be reached is not de- pendent on the internal link resources of the M7 CPU/FM. Two types of function calls are available: Calls for communicating with partners in the MPI subnet Calls for communication within a SIMATIC station It is not necessary for the links to be configured. The link to the communi- cation partner is established dynamically when the function is called. Link Resources The link resources are not reserved in advance on a CPU/FM via configu- ration, they are only requested when the function is called dynamically and are released again depending on the parameterization. If no spare resources are available on the CPU, a new link cannot be es- tablished (temporary resource shortage). Communication Functions On the server side, no function calls are necessary in the user program for the functions M7PBKXGet and M7PBKXPut or M7PBKIGet and M7PBKIPut, because these communication functions are processed by the operating system. Communication Functions for M7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 5-3 Communication via the MPI Subnet All communication partners on the MPI subnet can be accessed using the communication functions. Write and read access to S7-200 CPU data is also possible. The following function calls are available for this purpose (see STEP 7 documentation): Function Call Description M7PBKXSend Asynchronous sending of data is started to an X_RCV block or M7PBKXRcv call from the communication partner. M7PBKXRcv Asynchronous receiving of data is started from an X_SEND block or M7PBKXSend call from the com- munication partner. M7PBKXGet The asynchronous reading of a variable is started from the S7 object server or S7 CPU data area of the com- munication partner. These functions are provided in the communication partner by the operating system. M7PBKXPut The asynchronous writing of a variable is started from the S7 object server or S7 CPU data area of the com- munication partner. These functions are provided in the communication partner by the operating system. M7PBKXAbort This is used to abort an existing link that was estab- lished via the functions M7PBKXSend, M7PBKXPut or M7PBKXGet without having to transfer data. This al- lows the corresponding link resources to be released again on both sides. M7PBKXCancel This is used to cancel asynchronous data reception that was started via the function M7PBKXRcv. Addressing of the Communication Partners In the case of the function calls listed above, the communication partners are addressed via the station address configured using STEP 7 on the MPI subnet. The communication partners do not have to be within the same S7 project. Subnets The communication partners to be accessed must be connected to a common MPI subnet. Size of Useful Data The size of the useful data that can be transferred is 76 bytes maximum for any system. Communication Functions for M7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 5-4 Communication Within a SIMATIC Station Using the following function calls, you can access communication partners within a station (e.g. function modules (FMs) in the central rack or in an ET 200M). Within a SIMATIC station, you can only use one-sided communi- cation functions via non-configured links. The following function calls are available for this purpose (see STEP 7 documentation): Function Call Description M7PBKIGet The asynchronous reading of a variable is initiated from the S7 object server or S7 CPU data area of the communication partner. This function is provided in the communication partner by the operating system. M7PBKIPut The asynchronous writing of a variable is started from the S7 object server or S7 CPU data area of the com- munication partner. This function is provided in the communication partner by the operating system. M7PBKIAbort This is used to abort an existing link that was estab- lished via the functions M7PBKIPut or M7PBKIGet without having to transfer data. This allows the corre- sponding link resources to be released again on both sides. Addressing of the Communication Partner In the case of the function calls listed above, the communication partners are addressed via the module start address configured using STEP 7. Size of Useful Data The size of the useful data that can be transferred is 76 bytes maximum for any system. Communication Functions for M7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 5-5 5.2 Communication Functions for Configured S7 Links Overview The function calls for configured links can be used to exchange large quantities of data (up to 64 Kbytes) between an M7 CPU/FM and another module with communication capability. You can access communication partners in different subnets (MPI, PROFIBUS, Industrial Ethernet) as well as communication partners within the same station. The communication functions are not limited to data transfer - additional functions can also be used to control and monitor the communication partner. Links Configured links are necessary for communication purposes. These links are set up using STEP 7. Links can be assigned to two categories depending on their availability: Static links are always available. They are established by the operat- ing system. The maximum number is limited by the system re- sources. Dynamic links are only established in response to a user program request. The number of links that can be configured is therefore not limited. Link Resources If no spare resources are available on the CPU, a new link cannot be es- tablished (temporary resource shortage). Subnets The communication partners to be accessed must be on a common MPI subnet, PROFIBUS subnet or Industrial Ethernet. Communication Functions for M7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 5-6 Size of Useful Data The size of the useful data that can be transferred depends on the type of block used and the communication partner. Block M7-300/400 to S7-300 (server) M7-300/400 to S7-400 M7-300/400 to M7-300/400 M7PBKGet / M7PBKPut / M7BUBCycRead / M7BUBRead / M7BUBWrite 160 bytes 1) 400 bytes 1) 880 bytes 1) M7PBKUSend / M7PBKURcv - 440 bytes 920 bytes 1) M7PBKBsend / M7PBKBrcv - 64 Kbytes 64 Kbytes 1) Total size of the useful data for an SFB with 1 to 4 variables (see STEP 7 documentation). Addressing The communication partner is addressed via the local link end point (local ID). The local ID is generated by STEP 7 when the link is configured. The communication partner does not have to be within the same S7 project. Communication Functions for M7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 5-7 Parallel Arrangement of the Communication Functions Several communication SFBs can be executed simultaneously via a link. This is possible with the communication functions M7PBKBsend/M7PBKBrcv or M7PBKUsend/M7PBKUrcv. Using R_ID (block parameter) you can allocate a send and receive func- tion to the same link (same value in each case for R_ID). Figure 5-1: Several Communication SFBs via One Link Function Classes The communication calls can be categorized as follows: Functions for link management Send and receive functions Control functions Query and monitoring functions Functions for the human-machine interface Functions for Link Management You can use these calls for: Creating and closing the application relation for communication Querying information concerning the link, e.g. the size of useful data SFB 13 R_ID=2 SFB 12 R_ID=1 SFB 8 R_ID=3 SFB 12 R_ID=2 SFB 13 Link R_ID=1 ID ID SFB 9 R_ID=3 Communication Functions for M7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 5-8 Function Call Description M7KInitiate Creates the application relation for communi- cation M7KAbort Closes an application relation M7GetPduSize Queries the maximum size of useful data in- cluding the header M7GetConnStatus Queries the status of the application relation M7KPassword Log on for functions with a special protection level Send and Receive Functions You can use these communication functions to exchange data between two communication partners. The following function calls are available for this purpose: Function Call Description M7PBKBrcv Receives data, block-oriented: Asynchronous recep- tion of data is started from a B_SEND block or M7PBK B_SEND call from the communication part- ner. M7PBKBsend Sends data, block-oriented: Asynchronous sending of data is started to a B_RCV block or M7PBKBrcv call from the communication partner. M7PBKUSend Uncoordinated sending: Asynchronous sending of data is started to a U_RCV block or M7PBKURcv call from the communication partner. M7PBKURcv Uncoordinated receipt of data: Asynchronous receiv- ing of data is started from a U_SEND block or M7PBKUSend call from the communication partner. M7PBKGet The asynchronous reading of a variable is started from the S7 object server or S7 CPU data area of the communication partner. This function is provided in the communication partner by the operating system. M7PBKPut The asynchronous writing of a variable is started from the S7 object server or S7 CPU data area of the communication partner. This function is provided in the communication partner by the operating system. M7PBKCancel The currently active send or receive task (M7PBKBsend, M7PBKBrcv) is aborted. Communication Functions for M7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 5-9 Control Functions You can use these calls to send commands to change status to a commu- nication partner: Function Call Description M7PBKResume This triggers a warm restart for an S7-400 CPU when it is in the STOP state M7PBKStart This triggers a complete restart for an M7/S7-300/400 CPU when it is in the STOP state. M7PBKStop This stops an M7/S7-300/400 CPU when it is in the RUN, HALT or start-up state. Query and Monitoring Functions You can use these calls to Request information concerning the communication partner Read or set the time for a communication partner Output calls to the diagnostics server (the diagnostics server allows an application on the SIMATIC M7 to log itself on for diagnostics signals output by a distant controller) Function Call Description M7PBKStatus Outputs the operating status of a communica- tion partner M7DiagMode Logs on or off for diagnostics M7KEvent Fetches data for asynchronous messages M7KReadTime Reads the time M7KWriteTime Sets the time Communication Functions for M7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 5-10 Functions for Operator Control and Visualization You can use the M7-API calls for operator control and visualization to im- plement your own HMI applications on the M7 automation computer. M7-API provides, for example, functions for reading and writing or cyclic reading of variables from a distant programmable controller. Function Call Description M7BUBCycRead Task for setting up a cyclic read M7BUBCycReadDelete Task for deleting a cyclic read M7BUBCycReadStart Task for starting a cyclic read M7BUBCycReadStop Task for stopping a cyclic read M7BUBRead Read HMI variables M7BUBWrite Write HMI variables Cyclic Communication for S7/M7/C7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 6-1 6 Cyclic Communication for S7/M7/C7-300/400 Overview In this Chapter you will find an explanation of cyclic communication. Chapter Overview In Section You will find On page 6.1 Introduction 6-2 6.2 Global Data Communication (GD) 6-3 6.3 Distributed I/O via PROFIBUS-DP 6-7 6.4 Distributed I/O via the AS-i bus 6-9 Cyclic Communication for S7/M7/C7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 6-2 6.1 Introduction Definition In cyclic communication, the configured global data (e.g. bit memories, timers, counters and inputs/outputs) are only transferred, like the process image, once during cyclic program processing (OB1). Cyclic Communication Services Configured via Software Pack- ages Global data com- munication, GD GD table (MPI subnet -> Configure global data) STEP 7 Distributed I/O, PROFIBUS-DP STEP 7 hardware configuration STEP 7 Distributed I/O via AS-i bus AS-i CP with STEP 7 hardware configuration STEP 7 Cyclic Communication for S7/M7/C7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 6-3 6.2 Global Data Communication (GD) Overview In the S7 CPUs, simple communication services such as "GD communi- cation" are integral to the operating system. This means that via the MPI interface of the CPU, data can be exchanged cyclically with other CPUs without the need for programming. Cyclic data transfer takes place at the scan cycle checkpoint with the normal process image transfer. Features Up to 15 different stations (S7-300/400 CPU) can be entered in the global data table. No link resources are necessary on the S7-300/400 CPUs for global data communication. In global data communication, one S7-300/400 CPU sends its data simul- taneously to all S7-300/400 CPUs on the MPI subnet (broadcast tech- nique). Response Time The response time is dependent on the cycle of the user program and its value is a fraction of this cycle time (GD reduction factor). The following formula can be used to obtain an approximate value for the response time: T max. = Cycle Sender * R Factor Sender + Cycle Receiver + MPI No. of stns. Global Data Within the context of this communication technique, global data com- prises inputs, outputs, bit memories, timers, counters and areas in data blocks that are transferred between two or more S7-300/400 CPUs that are interconnected via MPI. Configuration of Global Data Global data communication is not programmed, but configured (menu bar: MPI subnet -> Define global data). Using STEP 7, you create a global data table that specifies the configura- tion data for data transfer. All S7-300/400 CPUs have to be in the same STEP 7 project. In the global data table, you must specify: which CPUs exchange data on the MPI subnet. which data has to be sent/received. the length of a GD object in bytes, words, double-words or in the case of a large data area by the start address and the length in bytes (e.g. MW30:8). Cyclic Communication for S7/M7/C7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 6-4 The following information can be entered if applicable: a reduction factor that specifies the number of program cycles after which the data should be sent/received a data area for the status information. Cyclic Transfer of Global Data The CPU sends the global data at the end of a cycle and reads this data at the beginning of a cycle. By stating a reduction factor in the global data table, you can specify the number of cycles after which data should be transmitted or received. GD Packet Global data that is transmitted from one sender to the same receivers is grouped into one GD packet. The GD packet is sent in a telegram. A GD packet is identified by a GD packet number. If the maximum length of a send GD packet is exceeded, a new GD circle is used. GD Circle The CPUs that are involved in the transfer of a common GD packet form a GD circle. If other CPUs are connected to an MPI subnet that exchange other GD packets, they form a second GD circle. Different circles can ac- cess the same CPU, i.e. they are permitted to overlap. Figure 6-1: Example to Show GD Circles and GD Packets Example The GD table corresponding to the above example is shown below. Global Data for Subnet "Example/MPI-Net1" GD Identifier CPU 1 CPU 2 CPU 3 CPU 4 GD 1.1.1 >>MB100 MB100 MB100 GD 1.1.2 >>MB100 EB100 EB102 GD 2.1.1 >>MW120 AW40 EW40 GD 3.1.1 MW30:8 >>MW30:8 CPU1 CPU2 CPU3 CPU4 GD packet A GD packet B GD packet C MPI subnet GD circle 1 GD circle 2 GD circle 3 Cyclic Communication for S7/M7/C7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 6-5 Note All CPUs must have a unique name because only the name is shown in the GD table (each S7 CPU only has the type name CPU314(1) as stan- dard). GD Identifier When the GD table has been successfully translated for the first time, the following identifier is assigned to the first column of global data: GD Resources of the CPUs The GD resources for a CPU are defined as the maximum number of GD circles in which the CPU is able to participate. Refer to the following table to find out what GD resources are available to your CPU. GD Resources CPU 312 CPU 313 CPU 314 CPU 315 CPU 412 CPU 413 CPU 414 CPU 416 Max. No. of GD circles per CPU 4 8 16 Max. No. of receive GD packets for all GD circles 4 16 32 Max. No. of send GD packets per GD circle 1 1 1 Max. No. of receive GD packets per GD circle 1 2 2 Max. No. of send GD packets for all GD circles 4 8 16 Max. length of GD packet 1) 22 bytes 54 bytes 54 bytes Reduction factor 1 to 225 1 to 255 1 to 255 Event-driven data transfer No Yes Yes 1) The values in the table are based on one variable. The maximum size of useful data per GD packet is reduced by 2 bytes for each additional variable. GD 1.1.2 Number of variables in GD packet Number of GD packet Number of GD circle Cyclic Communication for S7/M7/C7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 6-6 Data Consistency The maximum quantity of data that can be transferred consistently de- pends on the type of CPU as follows: CPU 31x CPU 412 CPU 413 CPU 414 CPU 416 8 bytes 32 bytes 32 bytes 32 bytes 32 bytes Event-Driven Global Data Transfer You can use the SFC 60 GD_SND and SFC 61 GD_RCV system functions to send or receive GD packets, in contrast to cyclic transfer, at any re- quired point in the user program. The prerequisite, however, is that you have configured data transmission, i.e. that you have created a global data table. As parameters of the SFCs, specify the numbers of the GD circle and GD packet that were generated when the global data table was configured. If you specify zero as the reduction factor in the global data table, the global data is only transferred when the appropriate SFCs are called. Cyclic Communication for S7/M7/C7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 6-7 6.3 Distributed I/O via PROFIBUS-DP Overview The "distributed I/O" is an expansion unit fitted with I/O modules that are connected via a parallel bus (via an IM) or via a serial bus (interface on CPU, IM or CP) to a central controller. The serial bus is PROFIBUS-DP, which handles open communication up to Layer 7 in accordance with the EN 50170 standard (Vol. 2, PROFIBUS-DP). This PROFIBUS-DP interface is integrated in the CPUs or a separate in- terface (IM or CP) is used. The I/O that is connected to PROFIBUS as a DP slave in the expansion unit (ET 200 station) is addressed in the same manner as every other I/O in the central controller or expansion unit. This means that you can access the I/O modules directly with instructions or via process image transfer. Features Up to 125 PROFIBUS DP slave stations can be connected to one DP master (e.g. CPU). The number depends on the type of CPU used. The distributed I/O can be accessed via the integral PROFIBUS-DP inter- face or via a PROFIBUS-CP or an IM. Parameters are assigned using STEP 7. The programming devices can also be connected via PROFIBUS. PROFIBUS-DP and SIMATIC-S7/M7 In SIMATIC S7/M7, the integrated PROFIBUS-DP interface in the CPU is supplemented with separate interfaces. Interfacing for SIMATIC S7: CPU 315-2 DP in S7-300 via integrated PROFIBUS-DP interface (master/slave) CPU 413-2 DP or CPU 414-2DP and CPU 416-2DP in S7-400 via integrated PROFIBUS-DP interface (only master) For the purpose of interfacing to PROFIBUS-DP in the case of SIMATIC M7, the IF 964-DP interface submodule is available which is plugged into the multifunctional interface (MFI). CPU 388-4 in M7-300 or with the FM 356 function module (master). The IF 964-DP interface submodule is plugged into the MFI in an expansion module (EXM). Cyclic Communication for S7/M7/C7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 6-8 CPUs 488-4 and 488-5 in M7-400 or with the FM 456-4 function module (master). The IF 964-DP interface submodule can be plugged into the MFI of these modules or into the MFI of the connected expansion module (EXM). AS-i Link See "Distributed I/O via the AS-i bus" in Section 6.4. Cyclic Communication for S7/M7/C7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 6-9 6.4 Distributed I/O via the AS-i bus Overview Like PROFIBUS-DP, the AS-i bus enables sensors and actuators to be linked to an automation system station, e.g. a SIMATIC S7. Up to 4 sensors/actuators per AS-i slave station (or 248 in total: 124 actua- tors + 124 sensors) can be connected. The sensors/actuators can be connected via standard cable. Power is supplied to the stations via the bus. The AS-i bus is connected via a CP. There is only one master on the AS-i bus. An AS-i slave station is addressed like any other I/O in the central control- ler or expansion unit. This means the actuators and sensors can be ac- cessed directly using I/O instructions or they are accessed via process image transfer. Features Up to 31 stations can be connected to a master CP. For parameterization purposes, the slave stations are supplied with a slave number via an ad- dress assignment device before connection to the AS-i bus. The response time is <= 5 ms The maximum length of the network is 300 m. Cyclic Communication for S7/M7/C7-300/400 Communication with SIMATIC EWA 4NEB 710 6075-02a 6-10 AS-i Link You can couple the AS-i subnet to the PROFIBUS-DP subnet using DP/AS-i Link (DP/AS-i link is a master) as a link between PROFIBUS-DP and AS-i. DP/AS-i link operates as a DP slave on PROFIBUS-DP, i.e. under normal operating conditions, you do not notice that the AS-i cable is at a lower system level (see also Chapter 3). Figure 6-2: Example of DP/AS-i Link Communication Functions on PCs Communication with SIMATIC EWA 4NEB 710 6075-02a 7-1 7 Communication Functions on PCs Overview Various software interfaces are offered for the PC in the form of packages (including hardware) or softnet products. All communication functions are available in the form of C interfaces. Chapter Overview In Section You will find On page 7.1 Communication Functions for Configured S7 Links (SAPI-S7) 7-2 7.2 PC Interface for SEND/RECEIVE 7-5 Communication Functions on PCs Communication with SIMATIC EWA 4NEB 710 6075-02a 7-2 7.1 Communication Functions for Configured S7 Links (SAPI-S7) Overview You can use the S7 functions for the PC (SAPI-S7) to exchange data between a PC and an S7/M7-CPU/FM. Communication partners can be accessed in different subnets (MPI, PROFIBUS, Industrial Ethernet). This is not limited to data transfer: control and monitoring functions can also be used. SAPI-S7 (simple application programmers interface) is the C program- ming interface for accessing the S7 on the programming device or PC (communication service). The SAPI-S7 interface is offered for various operating systems and hard- ware platforms (see Catalog IK 10). Features The services of the S7 functions can be processed on the PC and in the computer world. The SAPI-S7 programming interface is designed asynchronously. SAPI-S7 processes communication services as well as connecting and disconnecting links automatically. SAPI-S7 supports troubleshooting with an integrated trace function. The SAPI-S7 programming interface can also be used, for example, via VisualBASIC or Pascal programs. Links Configured S7 links are required for communication. The links are config- ured exclusively on the PC (e.g. using COML S7). Communication Functions on PCs Communication with SIMATIC EWA 4NEB 710 6075-02a 7-3 Functions The following client functions are supported: Local functions for processing administrative tasks. Send and receive functions for transferring (reading or writing) one or more variables. Operator control and visualization functions, i.e. cyclic read tasks can be parameterized and automatically executed. SAPI S7 Service Corresponds to Comm. SFB Description s7_get_vfd_state STATUS Outputs the status of a communi- cation partner on request s7_get_vfd_ustate USTATUS Receives the status messages sent sporadically from a communication partner s7_read GET (1 variable) Reads a variable from a communi- cation partner; input parameter is the remote address s7_write PUT (1 variable) Writes a variable to a communica- tion partner; input parameter is the remote address s7_multiple_read GET (several vari- ables) Reads several variables from a remote device; input parameters are the remote addresses s7_multiple_write PUT (several vari- ables) Writes several variables to a communication partner; input pa- rameters are the remote addresses s7_cycl_read Besy Sets up the server for cyclic read- ing of a variable and starts cyclic reading s7_cycl_read_init Besy Initializes the server for cyclic reading of a variable s7_cycl_read_start Besy Starts cyclic reading of a variable on the server s7_cycl_read_stop Besy Stops cyclic reading of a variable on the server s7_cycl_read_delete Besy Deletes cyclic reading of a variable on the server Communication Functions on PCs Communication with SIMATIC EWA 4NEB 710 6075-02a 7-4 Size of Useful Data The maximum size of useful data that can be transferred depends on the type of communication function used and the communication partner. Block PC to S7-300 (Server) PC to S7-400 PC to M7-300/400 s7_read 222 bytes 1) 462 bytes 1) 942 bytes 1) s7_write 212 bytes 1) 452 bytes 1) 932 bytes 1) s7-cycl_read 208 bytes 1) 448 bytes 1) 928 bytes 1) 1) The values in the table are based on one variable. The maximum size of useful data is re- duced by 4 bytes for a read and 14 bytes for a write for each additional variable. Data Consistency This is the maximum data area that can be read or written in the case of S7-300/400 CPUs as a continuous block. An array of the data types byte, word and double-word can be transferred consistently up to a maximum length which is specific to the CPU used as follows: CPU 31x CPU 412 CPU 413 CPU 414 CPU 416 8 bytes 32 bytes 32 bytes 32 bytes 32 bytes Addressing The communication partner is addressed via the local link end point. When the link is configured using COML S7, the address parameters (station address and rack/slot for SIMATIC S7/M7) of the communication partner has to be entered. Communication Functions on PCs Communication with SIMATIC EWA 4NEB 710 6075-02a 7-5 7.2 PC Interface for SEND/RECEIVE Overview You can use the SEND/RECEIVE programming interface to communicate with the SIMATIC systems from the PC. The SEND/RECEIVE interface is the C programming interface for access to the FDL, ISO transport and ISO-on-TCP services. Communication partners can be accessed in the PROFIBUS and Indus- trial Ethernet subnets. The SEND/RECEIVE interface is offered for various operating systems and hardware platforms (see Catalog IK 10). Features The SEND/RECEIVE programming interface is a simple interface for ex- changing data with any communication partners on the basis of standard- ized communication services. Links Configured FDL, ISO transport and ISO-on-TCP links are required for communication. The links are configured on the PC (e.g. using COML 1413) and on SIMATIC S7 with STEP 7 using the appropriate options package (NCM S7 PROFIBUS, NCM S7 Industrial Ethernet). The links can be established and removed, program-driven from the PC. Functions The following functions are supported: Function Description SEND_DATA Sends data blocks via a configured link to the communication partner RECEIVE_DATA Receives data blocks via a configured link from the communication partner CONN Establishes a link to the communication partner CLOSE Removes a link to the communication partner Size of Useful Data The maximum size of useful data that can be transferred to SIMATIC S7 is 240 bytes for all types of subnet. Data Consistency In the case of SIMATIC S7, useful data of up to 240 bytes can be trans- ferred consistently. Communication Functions on PCs Communication with SIMATIC EWA 4NEB 710 6075-02a 7-6 Link Resources Since in this case the links are configured, the configuring tool (e.g. COML 1413) checks at the configuration stage whether one link resource is still available. Addressing The communication partner is selected via the configured S7 link. Connecting SIMATIC Programming Devices/OPs Communication with SIMATIC EWA 4NEB 710 6075-02a 8-1 8 Connecting SIMATIC Programming Devices/OPs Overview In this Chapter, you will find out how to connect programming devices and human-machine interfaces and how to use TeleService. Chapter Overview In Section You will find On page 8.1 Programming Device/PC Interfacing for STEP 7 on Subnets 8-2 8.2 SIMATIC OP Interface to Subnets 8-4 8.3 TeleService 8-6 Connecting SIMATIC Programming Devices/OPs Communication with SIMATIC EWA 4NEB 710 6075-02a 8-2 8.1 Programming Device/PC Interfacing for STEP 7 on Subnets Overview When a programming device is used with STEP 7 on MPI/PROFIBUS/Ethernet, the complete functional scope of STEP 7 is available as well as the functions for SIMATIC S7 programming, diag- nostics and HMI. Features of STEP 7 Online Mode For online mode via MPI, a separate interface is not required for the pro- gramming device (integral). In online mode for programming devices/PCs via PROFIBUS/Ethernet, a PROFIBUS/Ethernet CP has to be installed in the programming device. Subnet Programming device with STEP 7 PC with STEP 7 MPI - MPI card (ISA) CP 5412-A2 (ISA) CP 5411 (ISA) CP 5511 (PCMCIA) CP 5611 (PCI) PROFIBUS CP 5412 A2 (ISA) CP 5411 (ISA) CP 5511 (PCMCIA) CP 5611 (PCI) CP 5412 A2 (ISA) CP 5411 (ISA) CP 5511 (PCMCIA) CP 5611 (PCI) Ethernet CP 1413 ISA) CP 1411 (ISA) CP 1511 (PCMCIA) CP 1413 ISA) CP 1411 (ISA) CP 1511 (PCMCIA) Note An address has to be assigned to the CPs in the stations (node christen- ing via MPI) to prepare them for online mode via PROFIBUS/Ethernet subnets. Procedure To use programming device mode via PROFIBUS/Ethernet, proceed as follows: In the Windows 95 system setup, open the dialog field "Set up pro- gramming device/PC interface". Set up the programming device/PC interface in accordance with the CPs available on your programming device ("Device parameters" field) and in accordance with the bus interface ("Characteristics" field). Please ensure that you enter consistent bus parameters. Connecting SIMATIC Programming Devices/OPs Communication with SIMATIC EWA 4NEB 710 6075-02a 8-3 Once you have carried out these steps, the programming device via PROFIBUS/Ethernet automatically finds its way to all intelligent modules in the SIMATIC S7 stations. Link Resources One link resource is required on the S7/M7 CPU for each programming device/PC link. By default, one link resource is permanently reserved in each S7/M7 CPU. One more spare link resource is required for each additional programming device/PC link. Programming Devices on PROFIBUS-DP Via PROFIBUS-DP, you can program and parameterize the CPUs of the controllers and carry out diagnostics from any point in a plant. No additional programming device interface is necessary, because PG 720, PG 740 and PG 760 have an integral PROFIBUS-DP interface with a transmission rate of 1.5 Mbit/s. A PROFIBUS-CP is available for higher transmission rates (up to 12 Mbit/s). PCs on PROFIBUS-DP If you want to program SIMATIC S7 or start it up via PROFIBUS using a PC, you will need a PC interface. The transmission rate of the PROFIBUS-CP in the PC is 12 Mbit/s max. Connecting SIMATIC Programming Devices/OPs Communication with SIMATIC EWA 4NEB 710 6075-02a 8-4 8.2 SIMATIC OP Interface to Subnets Overview The SIMATIC human machine interfaces can be connected via MPI/PROFIBUS/Industrial Ethernet. MPI/PROFIBUS/Ethernet PG/PC CP S7-300 S7-300 OP OP S7-400 Figure 8-1: Stations on the Subnet Features Communication between the OP and SIMATIC S7/M7 takes place via the S7 functions and is fully supported by the operating system of the CPU. For this reason, function blocks are not required on the SIMATIC S7/M7. The OP and SIMATIC S7/M7 communicate via user program data areas that have to be created in SIMATIC S7/M7. These data areas include, for example, messages, recipes and curves. An OP can exchange data simultaneously with more than one communi- cation partner (e.g. CPU or FM). Link Resources One link resource is required on the S7/M7 CPU for each OP link. By de- fault, one link resource is permanently reserved in each S7/M7 CPU. One spare link resource is required for each additional OP link. Connecting SIMATIC Programming Devices/OPs Communication with SIMATIC EWA 4NEB 710 6075-02a 8-5 Interface to S7/M7 MPI PROFIBUS Ethernet Integral interface Integral DP interface CP342-5, CP443-5 CP343-1 CP443-1 Max. no. of links to CPU/FM OP3 OP5 OP15 OP25 OP35 OP7 OP17 OP37 - OP5 OP15 OP25 OP35 OP7 OP17 OP37 - OP5 OP15 OP25 OP35 OP7 OP17 OP37 2 S7-200/300 4 S7/M7-300/400 4 S7/M7-300/400 4 S7/M7-300/400 6 S7/M7-300/400 4 S7/M7-300/400 4 S7/M7-300/400 8 S7/M7-300/400 ProTool ProTool ProTool OP47 OP47 OP47 OP47 8 S7/M7-300/400 WINCC PCs can be connected via Industrial Ethernet with WIN CC. Configuration The only requirement is that the communication partner has to be se- lected using ProTool. No other configuration is necessary. Operator Panels (OPs) OPs are not DP stations. The OPs use the S7 functions and not the PROFIBUS-DP functions. Connecting SIMATIC Programming Devices/OPs Communication with SIMATIC EWA 4NEB 710 6075-02a 8-6 8.3 TeleService Overview SIMATIC TeleService is used to link S7/M7-300/400 systems with pro- gramming devices/PCs via the telephone system. When the optional TeleService software package is integrated into STEP 7 V3.1, it provides you with the same STEP 7 functions as you have on site via the mul- tipoint interface (MPI). This "extension of MPI via the telephone system" supports fault analysis, fault rectification, start-up and update/upgrade measures. TeleService therefore guarantees the system availability of widely distributed installations. Additional nodes can be accessed within an MPI subnet. Features The following Hayes-compatible modems are supported: Analog modems (external modems on the RS232 interface, internal modems and PCMCIA cards) External ISDN adapters on the RS232 interface External ISDN modems (analog modem and ISDN adapter com- bined) on the RS232 interface Radio-telephone network with GSM technology (D1/D2) The modem link is established using the TeleService software. The transmission rate for the interface is up to 38.4 Kbit/s. V24 interface S7-300 MPI connection with TS adapter Modem Modem S7-300 MPI connection Figure 8-2: Connection of a Programming Device via TeleService Connecting SIMATIC Programming Devices/OPs Communication with SIMATIC EWA 4NEB 710 6075-02a 8-7 Requirements The prerequisite is that a physical connection between the programming device and the SIMATIC system exists (V24 interface of the program- ming device -> Modem -> Public telephone system -> Modem -> TS adapter -> MPI interface of the target system). The SIMATIC system is physically connected to the modem via the TS adapter with a multipoint interface. Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-1 9 Project Engineering and Configuring with STEP 7 Overview In this Chapter, building on basic STEP 7 know-how, you will find out how to solve your communication task, i.e. how to create subnets in S7 proj- ects and how to configure links. You will become familiar with the STEP 7 address assignment concept. Chapter Overview In Section You will find On page 9.1 S7 Project 9-2 9.2 Specifying the Network Configuration 9-3 9.3 Address Assignment 9-5 9.4 Link Resources 9-8 9.5 Configuring Links 9-13 Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-2 9.1 S7 Project Overview An S7 project represents the sum total of all data and programs, including the subnets of an automation solution, that are required to communicate with each other. The data that is contained within a project comprises in particular: Data describing the hardware configuration and parameterization data for the modules Configuration data for the subnets and the links Programs for programmable modules. This provides far-reaching possibilities for re-using components that have been developed previously for an automation solution. If you copy an S7 project, all lower hierarchic levels are also copied. CP CP Subnet Project Figure 9-1: Example of a Subnet - A Project Features The STEP 7 configuration procedure ensures consistency with respect to address assignment, bus parameters and baud rates within the communi- cation system. All communication partners for an automation task should therefore al- ways be grouped together in a project. Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-3 9.2 Specifying the Network Configuration Overview Similar to specifying the hardware configuration, where you configure the individual stations, on specifying the network configuration, the interac- tion of all communication partners has to be considered and the parame- ters have to be assigned accordingly. A previously configured network is the basis for communication. Here it is of no consequence whether you want to conduct communication in the user program via global data or via communication functions. When the network is configured for an S7 project, all settings are checked for plausibility and consistency. Duplicate station addresses or invalid pa- rameters are detected as they are entered. Network A network comprises one or more coupled subnets of the same or different types. It also comprises all stations that have to communicate with one another. Subnet A subnet (MPI, PROFIBUS, Industrial Ethernet) is the sum total of all physical components that are required to construct a data transfer path as well as the associated common technique that is required to exchange data. The components of a subnet are interconnected without network gateways. The individual stations are interconnected via the subnet. A point-to-point link is not defined as a subnet. Configuring So that stations are able to communicate with each other, the subnets required must be configured in the STEP 7 projects. A network or subnet configuration is specified by: Creating one or more subnets of the types required in the project; Specifying the characteristics of the subnets; the default settings are usually sufficient; Connecting the station "logically" to the subnet; Initializing the communication links. Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-4 Tools There are three different possibilities for specifying the network configura- tion: SIMATIC Manager For simple, clearly comprehensible network configurations, the SIMATIC Manager provides all the functions that are necessary for configuring and documentation. NCM S7 for PROFIBUS The optional package NCM S7 for PROFIBUS can be used to con- figure communication links via a PROFIBUS subnet. NCM S7 for Industrial Ethernet The optional package NCM S7 can be used to configure communi- cation links via an Ethernet subnet. Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-5 9.3 Address Assignment 9.3.1 Address Assignment via MPI Features Each communicating station has a unique MPI address (address range 0 to 31). The MPI address is automatically supplied by STEP 7 (default value) but can be changed. S7-300 Every module with communication capability in the S7-300 has a unique MPI address that is only permitted to be assigned once on network con- figuration. Only one CPU may be implemented in each rack. Figure 9-2 shows how MPI addresses are assigned within an S7-300 station. Special Feature When MPI subnets with S7-300 stations are configured, an address is not only automatically assigned for the S7-300 CPU in the station, an address is also determined for any FMs and CPs. FM Figure 9-2: Example Showing MPI Addresses The FM or CP module that is in the slot closest to the S7-300 CPU auto- matically receives the MPI address that follows the address already as- signed to the CPU and the next module receives the next address, and so on. Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-6 S7-400 An MPI address is only assigned to those modules that are fitted with an MPI connector. The MPI address may only be assigned once in the net- work configuration. Modules that are not fitted with an MPI connector are addressed indirectly via rack/slot number. Figure 9-3 shows a simple configuration with one rack. MPI addr. CPU CP Figure 9-3: Example of S7-400 MPI Address 9.3.2 Address Assignment via PROFIBUS Features Each communicating station has a unique PROFIBUS address (address range 0 to 126). The PROFIBUS address is one byte long. The PROFIBUS address is automatically supplied by STEP 7 (default value) but can be changed. Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-7 9.3.3 Address Assignment via Ethernet Features The Ethernet address (MAC address) is 6 bytes long. In the case of Sie- mens systems, it is built up as follows: 080006 01 0 xxx Hex Significant station address SIEMENS device SIEMENS system SIMATIC Number for the SIEMENS department Number for SIEMENS Addresses can be assigned to up to 1024 stations per segment. Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-8 9.4 Link Resources Introduction Each link requires link resources on the participating stations for the end point or for the transition point (e.g. to a CP). The number of link re- sources required depends on the CPU/CP type. When all the link resources of a communication partner are reserved, a new link can no longer be established. The different communication types are analyzed separately below. They can be combined as required, however, provided that the available link resources are taken into account. S7 Functions In the case of the S7 functions via the integral MPI/PROFIBUS-DP inter- face, one link resource per S7 link is reserved on the CPU for the end point. This applies to all S7/M7-300/400 CPUs. Figure 9-4: S7 Functions via Integral Interfaces In the case of S7 functions via an external CP interface, one link resource per S7 link is reserved on the CPU (for the end point) and one link re- source is reserved on the CP (transition point). This applies to all S7/M7-300/400 CPUs. Figure 9-5: S7 Functions via CP Interface CPU CPU MPI or PROFIBUS-DP Industrial Ethernet PROFIBUS CP Free link resource Free link resource Reserved link resource Reserved link resources Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-9 SEND/RECEIVE Interface Communication via the SEND/RECEIVE interface takes place exclusively via CPs. In this case, one link resource per link (i.e. FDL, ISO transport or ISO-on-TCP link) is reserved on the CP for the end point. On the S7-300 CPU no link resources are required for the link. Figure 9-6: Communication via SEND/RECEIVE Interface, S7-300 On the S7-400 CPU one link resource is required per CP for communica- tion to the CP. Figure 9-7: Communication via SEND/RECEIVE Interface, S7-400 (One Link is Reserved on the CPU per CP) S7-300 CPU CPU S7-400 CP CP Industrial Ethernet PROFIBUS Industrial Ethernet PROFIBUS Reserved link resource Reserved link resource Free link resource Free link resource Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-10 FMS Interface Communication via the FMS interface takes place exclusively via CPs. In this case, one link resource per FMS link is reserved on the CPU for the end point. On the CPU, one link resource is required per CP for communi- cation to the CP. Figure 9-8: Communication via FMS Interface S7 Functions via S7/M7-400 In the case of S7 functions via the internal MPI/PROFIBUS-DP interface, two link resources per S7 link are reserved on the CPU (for two transition points) and one link resource per S7 link is reserved on the FM (for the end point). This also applies to all other CPUs within the same station (multi-processor mode) because it is a node on MPI. Figure 9-9: Communication to an FM in S7/M7-400 via MPI or PROFIBUS-DP CPU S7/M7-400 CPU CP FM PROFIBUS MPI or MPI/PROFIBUS DP Free link resource Reserved link resource Free link resource Reserved link resources Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-11 S7 Functions via S7/M7-300 In the case of S7 functions via the MPI interface for an S7/M7-300, only one link resource is reserved on the FM for the end point. Figure 9-10: Communication to an FM in S7/M7 300 via MPI In the case of S7 functions via the internal MPI/PROFIBUS-DP interface, two link resources per S7 link are reserved on the CPU (for two transition points) and one link resource per S7 link is reserved on the FM (for the end point). Figure 9-11: Communication to an FM in the S7/M7 300 via PROFIBUS-DP S7/M7-300 CPU S7/M7-300 CPU FM FM MPI PROFIBUS-DP n+1 Free link resource Reserved link resource Free link resource Reserved link resources Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-12 S7 Functions via M7 FMs In the case of S7 functions via the internal FM PROFIBUS-DP interface, two link resources per S7 link are reserved on the FM (for two transition points) and one link resource per S7 link is reserved on the CPU (for the end point). Figure 9-12: Communication to a CPU via FM PROFIBUS-DP S7/M7-300 CPU M7 FM PROFIBUS-DP Free link resource Reserved link resources Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-13 9.5 Configuring Links Overview Communication links are always necessary when you want to execute communication functions in the user program (i.e. SFBs, loadable FCs/FBs). A link specifies the logical relationship for two communication partners. Links have to be configured before communication functions can be used in the user program. When a link is configured, the following are specified: The participating communication partners in the S7 project The type of link (e.g. S7 link, FDL link) Special characteristics, such as active/passive links or whether op- erating status messages should be transmitted. When the link is configured, a unique local identification, the so-called local ID is assigned. Only this local ID is required on parameterizing the communication function. A separate link table exists for each programmable module that can func- tion as the end point for a link. Special Characteristic If both communication partners are S7-400 stations, a local ID is auto- matically assigned to each end point of the link. In the case of links to an S7-300 station, only one local ID is generated on the S7-400 station. Loading the Configuration Data The local configuration data for the link end points on an S7 station must be loaded explicitly into each target station. Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-14 Link Resources The maximum number of links that can be configured depends on the link resources of the CPU used or on the CP. CPU Link Resources The link resources for each CPU are shown in the following table: S7-300 CPU 312 IFM CPU 313 CPU 314 CPU 315/-2 DP 1 PG 1 OP 2 for S7 fct. 1 PG 1 OP 2 for S7 fct. 4 for SFCs 1 PG 1 OP 2 for S7 fct. 8 for SFCs 1 PG 1 OP 2 for S7 fct. 8 for SFCs S7-400 CPU 412-1 CPU 413-1/2 DP CPU 414-1/2 DP CPU 416-1/2DP 1 PG 1 OP 14 for S7 fct. or 14 for SFCs 1 PG 1 OP 14 for S7 fct. or 14 for SFCs 1 PG 1 OP 30 for S7 fct. or 30 for SFCs 1 PG 1 OP 62 for S7 fct. or 62 for SFCs M7-300/400 CPU 388-4 FM 356-4 CPU 486-3 CPU 488-3 FM 456-4 8 PG 8 OP 40 for S7 fct. 8 PG 8 OP 40 for S7 fct. 8 PG 8 OP 40 for S7 fct. 1 PG 1 OP 24 for S7 fct. PG Reserved programming device link OP Reserved OP link S7 fct. For S7 functions via programming devices/OPs or SFBs or M7-API SFCs For communication SFCs via non-configured links Note If more than one programming device or OP is connected, the number of available link resources for S7 functions is reduced accordingly. Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-15 CP Link Resources The number of link resources is limited on the CPs used as follows: S7-300 CP 343-1 CP 343-1 TCP CP 342-5 CP 343-5 16 S7 fct. 16 ISO trans. 16 S7 fct. 16 TCP/IP 16 S7 fct. 16 FDL 16 S7 fct. 16 FDL 16 FMS 32 32 32 48 S7-400 CP 443-1 CP 443-1 TCP CP 443-5 Extended CP 443-5 Basic 48 S7 fct. 64 ISO trans. 48 S7 fct. 64 TCPIP 32 S7 fct. 32 FDL 32 S7 fct. 32 FDL 32 FMS 64 64 64 48 S7 fct. for S7 functions via programming devices/OPs or SFBs or M7-API ISO trans. ISO transport link TCP/IP ISO-on-TCP link FDL FDL link FMS FMS link Maximum total link resources Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-16 9.5.1 Special Case of the Point-to-Point Link Point-to-Point Link For a link between an S7-400 CPU and a communication partner that is connected via a point-to-point link, the local CP 441 represents the cou- pling element. Conversion to the addressing mechanism of the selected transfer procedure takes place on the CP 441. The point-to-point link therefore ends on the CP 441 and not on the communication partner as in the case of the other link types. The number of possible links to the CP 441 depends on the procedure used (1 link for 3964 (R), 1 to 4 links for RK 512). The CP 441-2 has 2 physical interfaces, so up to 8 links can be config- ured to it. Figure 9-13: Point-to-Point Link CPU CP Point-to-point link Free link resource Point-to-point link Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-17 9.5.2 Links to Non-S7 Stations Definition Within the context of STEP 7, "non-S7 stations" are S5 stations PCs Non-Siemens systems (S7 stations in another project) S7 links cannot be configured to the stations listed above, but FDL, ISO transport and ISO-on-TCP links can be configured. For this purpose, the TSAPs or LSAPs have to be entered or adapted in the characteristics screen form for the configured link. Configuration of the Installation In addition to SIMATIC S7 stations, SIMATIC S5 stations and non- Siemens systems may be connected in your installation. CP CP Subnet Project SIMATIC S5 Non-Siemens unit S7-400/1 S7-300/1 S7-300/2 Figure 9-1: Example of SIMATIC S5 and Non-Siemens Systems on the Subnet Presentation in the STEP 7 Project SIMATIC S5 stations that are to take part in the communication can be selected directly. Non-Siemens systems must be entered as "Other sta- tions" on configuration. Project Engineering and Configuring with STEP 7 Communication with SIMATIC EWA 4NEB 710 6075-02a 9-18 Notes Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-1 10 Programming Examples Overview In this Chapter, you will find the following communication examples: Chapter Overview In Section You will find On page 10.1 Communication with SFCs 10-2 10.2 Communication with SFBs 10-4 10.3 Communication with FDL between SIMATIC S7s 10-7 10.4 Communication with FDL - SIMATIC S7 and S5 10-9 10.5 DP Communication via CPs 10-11 10.6 Communication with ISO Transport between SIMATIC S7s 10-12 10.7 Communication with ISO Transport - SIMATIC S7 and S5 10-14 Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-2 10.1 Communication with SFCs Introduction This programming example shows how data is exchanged between three S7-300 CPUs via communication SFCs for non-configured links. In the program, a client station establishes an alternating link to one of the other two CPUs that act as servers, for the purpose of exchanging data. Following each transfer, the link is removed again. The communication SFCs are called at specified intervals in OB 35. Communication SFCs Used Block Description SFC 65 X_SEND Using this block, you can send data to a communi- cation partner. SFC 66 X_RCV Using this block, you can receive all data that is sent from other communication partners. SFC 67 X_GET Using this block, you can read exactly one variable from a communication partner. SFC 68 X_PUT Using this block, you can write exactly one variable to a communication partner. SFC 69 X_ABORT Using this block, you can explicitly remove the link established to the communication partner. Hardware Configuration The example is based on the hardware configuration shown in the figure. CPU 315 CPU 315 S7-300 Server MPI 12 MPI Addr. 12 Addr. 10 Addr. 15 CPU 315 S7-300 Client MPI 10 S7-300 Server MPI 15 Figure 10-1: Hardware Configuration Project Name The project name is "COM_SFC1". Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-3 Use Use the example program as follows: After a memory reset on each CPU, load the appropriate program in the CPU. Execute a complete restart on each CPU. This causes initialization of the link references and the send and re- ceive areas. The send data is modified in the program so that you can see the data transfer has been successful from the change in the receive data. In the event of an error occurring during data transfer, evaluate the RET_VAL output parameter of the associated communication SFC. Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-4 10.2 Communication with SFBs Introduction The programming example shows how data is exchanged between two S7-400 CPUs via communication SFCs for configured links. In the programs for the sending and the receiving CPU, data transfer is activated via bit memories. You can change these bit memories via the associated variable table "VAT 1". In the sending CPU, a positive edge on a bit memory starts the associated communication SFB. In the receiving CPU, the "1" state on a bit memory enables the associated receive SFB. Communication SFBs Used Block Function SFB 8/ SFB 9 USEND/ URCV Uncoordinated data exchange via a send and receive SFB (two-sided communication) SFB 12/ SFB 13 BSEND/ BRCV Block-oriented data exchange via a send and receive SFB (two-sided communication) SFB 14 GET Read data from a remote system (one-sided communication) SFB 15 PUT Write data to the remote system SFB 19 START Activate a complete restart in the remote system SFB 20 STOP Set remote system into the STOP state SFB 21 RESUME Activate a restart in the remote system SFB 22 STATUS Query the status of the remote system SFB 23 USTATUS Receive status that was sent from the remote system without being requested Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-5 Bit memories Used Bit Memory Meaning M 20.0 Activate USEND M 20.1 Enable for URCV M 20.2 Activate BSEND M 20.3 Enable for BRCV M 20.4 Activate GET M 20.5 Activate PUT M 20.6 Activate START M 20.7 Activate STOP M 21.0 Activate RESUME M 21.1 Activate STATUS M 21.2 Activate USTATUS Link Type A configured S7 link is used in this example. All blocks operate via this link. On both CPUs, the link ID number is W#16#0001. Hardware Configuration The example is based on the hardware configuration shown in the figure. SIMATIC-400 SEND SIMATIC-400 RCV MPI CPU 416-1 CPU 414-1 Addr. 12 Addr. 9 Figure 10-2: Hardware Configuration Project Name The project name is "COM_SFB". Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-6 Use Use the example program as follows: After a memory reset on each CPU, load the appropriate program in the CPU. Execute a complete restart on each CPU. This causes initialization of the link references and the send and re- ceive areas. The send areas are preset with the number of the as- sociated SFBs and the receive areas are preset with "0". Call up the variable tables "VAT 1" (on the sending CPU) and "VAT 2" (on the receiving CPU). Enable the receive SFBs on the receiving CPU by setting the appro- priate bit memories (M20.1 and M20.3) to "1" in the "VAT 2" variable table. Start data transfer on the sending CPU by setting the appropriate bit memories (M20.0, M20.2 and M20.4 to M21.2) to "1" in the "VAT 1" variable table. Change the contents of the send areas, as required. In the event of an error occurring during data transfer, evaluate the ERROR and STATUS output parameters of the associated commu- nication SFB. Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-7 10.3 Communication with FDL between SIMATIC S7s Introduction The example program shows how data is exchanged between two S7-300 CPUs with the FCs AG_SEND and AG_RECV via FDL links. FCs Used Block Description FC 5 AG_SEND Using this block, you can send data blocks to a communication partner. FC 6 AG_RECV Using this block you can receive data blocks that have been sent by other communication partners. Link Type In this example, an FDL link that has been configured using NETPRO (or NCM) is used. This link is established by the CP independently of the CPU program. Hardware Configuration The example is based on the hardware configuration shown in the figure. SIMATIC-300 station (1) SIMATIC-300 station (2) PROFIBUS CPU 314 CPU 314 Addr. 6 Addr. 2 CP 342-5 CP 342-5 Figure 10-3: Hardware Configuration Project Name The project name is "PROJECT-PROFIBUS". The STEP 7 project is supplied with NETPRO (or NCM) and created on installation. Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-8 Use The use of this example program is described in the document "NCM S7 for PROFIBUS". It describes the following steps in detail: Creating/opening the project Configuring and interconnecting the hardware Configuring the communication service Creating the user program Start-up and diagnostics Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-9 10.4 Communication with FDL - SIMATIC S7 and S5 Introduction The example program shows how data is exchanged between an S7-300 CPU and an S5 CPU with the FCs AG_SEND and AG_RECV or the FBs HTB-SEND and HTB-RECEIVE via FDL links. FCs Used Block Description FC 5 AG_SEND Using this block, you can send data blocks to a communication partner. FC 6 AG_RECV Using this block you can receive data blocks that have been sent by other communication partners. FBs Used (for S5) Block Description FB x 1) HTB-SYNC Using this block, you can synchronize the S5 CP 5431. FB x 1) HTB-CTRL Using this block, you can receive the status infor- mation for the link. FB x 1) HTB-SEND Using this block, you can send data blocks to a communication partner. FB x 1) HTB- RECEIVE Using this block, you can receive data blocks that have been sent by other communication partners.
1) FB no. depends on the S5 CPU used Link Type In this example an FDL link is used that has been configured on the STEP 7 side using NETRPRO (or NCM) and on the STEP 5 side with NCM COM 5430/5431. This link is established by the CPs via the HTB-SYNC block. Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-10 Hardware Configuration The example is based on the hardware configuration shown in the figure. SIMATIC-300 station (3) SIMATIC S5 (1) PROFIBUS CPU 314 CPU x Addr. 4 Addr. 8 CP 342-5 CP 5431 Figure 10-4: Hardware Configuration Directory and Project Name The code for the STEP 7 example program can be found in the directory "step7\examples\profibus". The project name is "PROFIBUS". The STEP 7 project is supplied with NETPRO (or NCM) and created on installation. The STEP 5 sections of the example program are supplied with NCM COM 5430/5431. Link Type A link that does not require configuring is used in this example. This link is established and removed dynamically by the program. Use The STEP 7 side of this example program is described in the document "NCM S7 for PROFIBUS". It describes the following steps in detail: Creating/opening the project Configuring and interconnecting the hardware Configuring the communication service Creating the user program Start-up and diagnostics Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-11 10.5 DP Communication via CPs Introduction The example program shows how data is exchanged between two S7-300 CPUs via PROFIBUS-DP. FCs Used Block Description FC 1 DP_SEND Using this block, you can send data areas to a communication partner. FC 2 DP_RECV Using this block, you can receive data areas that have been sent by another communication partner. Hardware Configuration The example is based on the hardware configuration shown in the figure. SIMATIC-300 DP master SIMATIC-300 DP slave PROFIBUS CPU 314 CPU 314 Addr. 12 Addr. 10 CP 342-5 CP 342-5 Figure 10-5: Hardware Configuration Project Name The project name is "PROFIBUS". The STEP 7 project is supplied with NETPRO (or NCM) and created on installation. Use The use of this example program is described in the document "NCM S7 for PROFIBUS". It describes the following steps in detail: Creating/opening the project Configuring and interconnecting the hardware Configuring the communication service Creating the user program Start-up and diagnostics Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-12 10.6 Communication with ISO Transport between SIMATIC S7s Introduction The example program shows how data is exchanged between two S7-300 CPUs with the FCs AG_SEND and AG_RECV via ISO transport links. FCs Used Block Description FC 5 AG_SEND Using this block, you can send data blocks to a communication partner. FC 6 AG_RECV Using this block, you can receive data blocks that have been sent by other communication partners. Link Type In this example, an ISO transport link that has been configured using NETRPRO (or NCM) is used. This link is established by the CP independ- ently of the CPU program. Hardware Configuration The example is based on the hardware configuration shown in the figure. SIMATIC-400 station (2) Ethernet Addr. 080006010000 SIMATIC-400 station (1) CPU 414-1 CP 443-1 CPU 414-1 Addr .080006010001 CP 443-1 Figure 10-6: Hardware Configuration Project Name The project name is "Ethernet". The STEP 7 project is supplied with NETPRO (or NCM) and created on installation. Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-13 Use The use of this example program is described in the document "NCM S7 for Industrial Ethernet". It describes the following steps in detail: Creating/opening the project Configuring and interconnecting the hardware Configuring the communication service Creating the user program Start-up and diagnostics Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-14 10.7 Communication with ISO Transport - SIMATIC S7 and S5 Introduction The example program shows how data is exchanged between an S7-400 CPU and an S5 CPU with the FCs AG_SEND and AG_RECV or the FBs HTB-SEND and HTB-RECEIVE via ISO transport links. FCs Used Block Description FC 5 AG_SEND Using this block, you can send data blocks to a communication partner. FC 6 AG_RECV Using this block, you can receive data blocks that have been sent by another communication partner. FBs Used (for S5) Block Description FB x 1) HTB-SYNC Using this block, you can synchronize the S5 CP 5431. FB x 1) HTB-CTRL Using this block, you can receive the status infor- mation for the link. FB x 1) HTB-SEND Using this block, you can send data blocks to a communication partner. FB x 1) HTB- RECEIVE Using this block, you can receive data blocks that have been sent by another communication partner.
1) FB no. depends on the S5 CPU used Link Type In this example, an ISO transport link is used that has been configured on the STEP 7 side using NETRPRO (or NCM) and on the STEP 5 side with NCM COM 1430 TF. This link is established by the CPs following an error- free call of the HTB-SYNC block. Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-15 Hardware Configuration The example is based on the hardware configuration shown in the figure. Ethernet Addr. 080006010003 SIMATIC-400 station (3) CPU 414-1 CP 443-2 SIMATIC S5 (1) CPU x Addr. 080006010002 CP 1430 TF Figure 10-7: Hardware Configuration Project Name The project name is "Ethernet". The STEP 7 project is supplied with NETPRO (or NCM) and created on installation. The STEP 5 sections of the example program are supplied with NCM COM 1430 TF. Use The use of this example program is described in the document "NCM S7 for Industrial Ethernet". It describes the following steps in detail: Creating/opening the project Configuring and interconnecting the hardware Configuring the communication service Creating the user program Start-up and diagnostics Programming Examples Communication with SIMATIC EWA 4NEB 710 6075-02a 10-16 Notes Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-1 A Appendix Chapter Overview In Section You will find On page A.1 Communications Matrix A-2 A.2 Technical Data A-12 A.3 Performance Data A-19 Glossary A-29 Communication with SIMATIC EWA 4NEB 710 6075-02a A-2 A.1 Communications Matrix Definition Stations are categorized as follows: Station (T) A station is able to communicate with another sta- tion in both directions (global data communication, GD). Client (C) A client presents a communications task to the server. Server (S) A server executes a task presented by the client. For communication to take place in accordance with the client/server principle, one communications partner must be the client and the other must be the server. This means that communication is not possible be- tween two servers or two clients. From the following tables, it is possible to determine how the automation systems are able to communicate with one another. The communication characteristics are listed for each component: Subnet Services Communications partner This information can be used to determine whether two communications partners are able to communicate with one another. Two communications partners can communicate with each other when all the following condi- tions are met: The "subnets" are identical The "services" are identical The communications partners form a pair, e.g. one is "client" and the other "server", i.e. the communications rules listed above are satis- fied. Note Only those communications possibilities have been listed that have al- ready been implemented in the S7-200, S7/M7-300/400 systems. Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-3 A.1.1 MPI Subnet MPI Subnet Communication Machine-Readable S7 Functions Global Partner Product Designation (MLFB) SFBs SFCs HMI Data S7-200 CPU 215 6ES7 215-2AD00-0XB0 S 1) S 2) S - via DP interface 6ES7 215-2BD00-0XB0 S 1) S 2) S - S7-300 CPU 312 IFM 6ES7 312-5AC00-0AB0 - - S T CPU 313 6ES7 313-1AD00-0AB0 S 1) - S T 6ES7 313-1AD01-0AB0 S 1) C/S S T CPU 314 6ES7 314-1AE00-0AB0 S 1) - S T 6ES7 314-1AE01-0AB0 S 1) - S T 6ES7 314-1AE02-0AB0 S 1) C/S S T CPU 314 IFM 6ES7 314-5AE00-0AB0 S 1) - S T 6ES7 314-5AE01-0AB0 S 1) C/S S T CPU 315 6ES7 315-1AF00-0AB0 S 1) - S T 6ES7 315-1AF01-0AB0 S 1) C/S S T CPU 315-2 DP 6ES7 315-2AF00-0AB0 S 1) - S T 6ES7 315-2AF01-0AB0 S 1) C/S S T FM 353 6ES7 353-1AH00-0AE0 - - S - 6ES7 353-1AH01-0AE0 - - S - FM 354 6ES7 354-1AH00-0AE0 - - S - 6ES7 354-1AH01-0AE0 - - S - FM 355 C 6ES7 355-0VH00-0AE0 - S 2) - - 6ES7 355-0VH10-0AE0 - - S - FM 355 S 6ES7 355-1VH00-0AE0 - S 2) - - 6ES7 355-1VH10-0AE0 - - S - M7-300 FM 356-4 6ES7 356-4BN00-0AE0 C/S C/S C/S - 6ES7 356-4BM00-0AE0 C/S C/S C/S - CPU 388-4 6ES7 388-4BN00-0AC0 C/S C/S C/S - 1) Only with GET/PUT functions (SFB block is not required in user program)! 2) Only with I-GET/I-PUT functions! Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-4 MPI Subnet Communication Machine-Readable S7 Functions Global Partner Product Designation (MLFB) SFBs SFCs HMI Data S7-400 CPU 412-1 6ES7 412-1XF00-0AB0 C/S - S T 6ES7 412-1XF01-0AB0 C/S C/S S T CPU 413-1 6ES7 413-1XG00-0AB0 C/S - S T 6ES7 413-1XG01-0AB0 C/S C/S S T CPU 413-2DP 6ES7 413-2XG00-0AB0 C/S - S T 6ES7 413-2XG01-0AB0 C/S C/S S T CPU 414-1 6ES7 414-1XG00-0AB0 C/S - S T 6ES7 414-1XG01-0AB0 C/S C/S S T CPU 414-2DP 6ES7 414-2XG00-0AB0 C/S - S T 6ES7 414-2XG01-0AB0 C/S C/S S T 6ES7 414-2XJ00-0AB0 C/S C/S S T CPU 416-1 6ES7 416-1XJ00-0AB0 C/S - S T 6ES7 416-1XJ01-0AB0 C/S C/S S T CPU 416-2DP 6ES7 416-2XK00-0AB0 C/S C/S S T 6ES7 416-2XL00-0AB0 C/S C/S S T M7-400 CPU 486-3 6ES7 486-3AA00-0AB0 C/S C/S C/S - CPU 488-3 6ES7 488-3AA00-0AB0 C/S C/S C/S - FM 456-4 6ES7 456-4EY00-0AE0 C/S C/S C/S - C7-620 C7 621 6ES7 621-1AD00-0AE3 S - C/S T C7 623 6ES7 623-1AE00-0AE3 S - C/S T C7 623 a 6ES7 623-1CE00-0AE3 S - C/S T C7 624 6ES7 624-1AE00-0AE3 S - C/S T C7 626 6ES7 626-1AG00-0AE3 S - C/S T C7 626 a 6ES7 626-1CG00-0AE3 S - C/S T C7 626 DP 6ES7 626-2AG00-0AE3 S - C/S T OPs (with ProTool V 3.x) OP 7/DP 6AV3 607-1JC20-0XA0 - - C - OP 7/DP-12 6AV3 607-1JC30-0XA0 - - C - OP 17/DP 6AV3 617 1JC20-0XA0 - - C - OP 17/DP-12 6AV3 617 1JC30-0XA0 - - C - OP 25 6AV3 525-1EA.1-0AX0 - - C - OP 35 6AV3 535-1FA01-0AX0 - - C - OP 37 6AV3 637-1 .L00-0 . X0 - - C - OPs (with ProTool < V 3.x) OP 3 6AV3 503-1DB10 - - - - OP 5/A2 6AV3 505-1FB12 - - C 3) - OP 15/A2 6AV3 515-1EB32-1AA0 - - C 3) - Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-5 MPI Subnet Communication Machine-Readable S7 Functions Global Partner Product Designation (MLFB) SFBs SFCs HMI Data OP 15/C2 6AV3 515-1MA22-1AA0 - - C 3) - OP 7/DP 6AV3 607-1JC20-0XA0 - - C 3) - OP 7/DP-12 6AV3 607-1JC30-0XA0 - - C 3) - OP 17/DP 6AV3 617 1JC20-0XA0 - - C 3) - OP 17/DP-12 6AV3 617 1JC30-0XA0 - - C 3) - OP 25 6AV3 525-1EA.1-0AX0 - - C 3) - OP 35 6AV3 535-1FA01-0AX0 - - C 3) - OP 37 6AV3 637-1. L00-0 .X0 - - C 3) - 3) Communication is only possible to the following FMs: FM 353 MLFB: 6ES7 353-1AH00-0EA0 FM 354 MLFB: 6ES7 354-1AH00-0EA0 Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-6 A.1.2 PROFIBUS Subnet PROFIBUS Subnet Communication Machine-Readable Via Integral PROFIBUS-DP Via PROFIBUS-CPs Partner Product Designation S7 Functions S7 Functions FDL FMS (MLFB) SFBs I-SFCs HMI 1) SFBs HMI S7-200 CPU 215 6ES7 215-2AD00-0XB0 - - S - - - - 6ES7 215-2BD00-0XB0 - - S - - - - S7-300 CPU 312 IFM 6ES7 312-5AC00-0AB0 - - - CPU 313 6ES7 313-1AD00-0AB0 - - - 6ES7 313-1AD01-0AB0 - - - CPU 314 6ES7 314-1AE00-0AB0 - - - 6ES7 314-1AE01-0AB0 - - - 6ES7 314-1AE02-0AB0 - - - CPU 314 IFM 6ES7 314-5AE00-0AB0 - - - 6ES7 314-5AE01-0AB0 - - - S via C/S via C/S via CPU 315 6ES7 315-1AF00-0AB0 - - - CP 342-5 CP 342-5 CP 343-5 6ES7 315-1AF01-0AB0 - - - or or CPU 315-2 DP 6ES7 315-2AF00-0AB0 - - - CP 343-5 CP 343-5 6ES7 315-2AF01-0AB0 - C 2) /S S FM 353 6ES7 353-1AH00-0AE0 - - S - - 6ES7 353-1AH01-0AE0 - - S - 3) - - FM 354 6ES7 354-1AH00-0AE0 - - S - - 6ES7 354-1AH01-0AE0 - - S - 3) - - FM 355 C 6ES7 355-0VH00-0AE0 - - - - - - 6ES7 355-0VH10-0AE0 - S 4) S - - - FM 355 S 6ES7 355-1VH00-0AE0 - - - - - - 6ES7 355-1VH10-0AE0 - S 4) S - - - M7-300 CPU 388-4 6ES7 388-4BN00-0AC0 - C S - FM 356-4 6ES7 356-4BM00-0AE0 - - S C/S via CP 342-5 - C/S via 6ES7 356-4BN00-0AE0 - C S or CP 343-5 - CP 343-5 1) S7 functions 2) Communication with distributed FMs 353/354/355 is possible with product release 03 and later 3) Not possible via CP 342-5 or CP 343-5! 4) Decentralized communication in an ET 200M is possible with IM 153-2 Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-7 PROFIBUS Subnet Communication Machine-Readable Via Integral PROFIBUS-DP Via PROFIBUS-CPs Partner Product Designation S7 Functions S7 Functions FDL FMS (MLFB) SFBs I-SFCs HMI 1) SFBs HMI S7-400 CPU 412-1 6ES7 412-1XF0.-0AB0 - - - CPU 413-1 6ES7 413-1XG0.-0AB0 - - - CPU 414-1 6ES7 414-1XG00-0AB0 - - - 6ES7 414-1XG01-0AB0 - - - CPU 416-1 6ES7 413-2XG00-0AB0 - - - 6ES7 416-1XJ01-0AB0 - - - C/S via S via C/S via C/S via CPU 413-2DP 6ES7 413-2XG00-0AB0 - - S CP 443-5 CP 443-5 CP 443-5 CP 443-5 6ES7 413-2XG01-0AB0 - C 5) S Extended Extended Extended Basic CPU 414-2DP 6ES7 414-2XG00-0AB0 - - S or or or 6ES7 414-2XG01-0AB0 - C 5) S CP 443-5 CP 443-5 CP 443-5 6ES7 414-2XJ00-0AB0 - C 6) S Basic Basic Basic 416-2DP 6ES7 416-2XK00-0AB0 - C 6) S 6ES7 416-2XL00-0AB0 - C 6) S M7-400 CPU 486-3 6ES7 486-3AA00-0AB0 - C S C/S via - C/S via CPU 488-3 6ES7 488-4AA00-0AB0 - C S CP 443-5 Extended or - CP 443-5 FM 456-4 6ES7 456-4EY00-0AE0 - C S CP 443-5 Basic - Basic C7-620 C7 621 6ES7 621-1AD00-0AE3 - - - - - - - C7 623 6ES7 623-1AE00-0AE3 - - - - - - - C7 623 a 6ES7 623-1CE00-0AE3 - - - - - - - C7 624 6ES7 624-1AE00-0AE3 - - - - - - - C7 626 6ES7 626-1AG00-0AE3 - - - - - - - C7 626 a 6ES7 626-1CG00-0AE3 - - - - - - - C7 626 DP 6ES7 626-2AG00-0AE3 - - S - - - - 1) S7-functions 5) Communication with distributed FMs 353/354/355 is possible with product release 02 and later 6) Communication with distributed FMs 353/354/355 is possible with product release 04 and later Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-8 PROFIBUS Subnet Communication Machine-Readable Via Integral PROFIBUS-DP Via PROFIBUS-CPs Partner Product Designation S7 Functions S7 Functions FDL FMS (MLFB) SFBs I-SFCs HMI 1) SFBs HMI OPs (with ProTool V 3.x) OP 7/DP 6AV3 607-1JC20-0XA0 - - C 7) - C - - OP 7/DP-12 6AV3 607-1JC30-0XA0 - - C 7) - C - - OP 17/DP 6AV3 617 1JC20-0XA0 - - C 7) - C - - OP 17/DP-12 6AV3 617 1JC30-0XA0 - - C 7) - C - - OP 25 6AV3 525-1EA.1-0AX0 - - C 7) - C - - OP 35 6AV3 535-1FA01-0AX0 - - C 7) - C - - OP 37 6AV3 637-1 .L00-0 . X0 - - C 7) - C - - OPs (with ProTool < V 3.x) OP 3 6AV3 503-1DB10 - - C - C - - OP 5/A2 6AV3 505-1FB12 - - C - C - - OP 15/A2 6AV3 515-1EB32-1AA0 - - C - C - OP 15/C2 6AV3 515-1MA22-1AA0 - - C - C - - OP 7/DP 6AV3 607-1JC20-0XA0 - - C - C - - OP 7/DP-12 6AV3 607-1JC30-0XA0 - - C - C - - OP 17/DP 6AV3 617 1JC20-0XA0 - - C - C - - OP 17/DP-12 6AV3 617 1JC30-0XA0 - - C - C - - OP 25 6AV3 525-1EA.1-0AX0 - - C - C - - OP 35 6AV3 535-1FA01-0AX0 - - C - C - - OP 37 6AV3 637-1. L00-0 .X0 - - C - C - - 1) S7-functions 7) Communication with the following distributed FMs in an ET 200M is possible via ProTool, product release V 4.0 or later: FM 353 MLFB: 6ES7 353-1AH01-0EA0 FM 354 MLFB: 6ES7 354-1AH01-0EA0 FM 355C MLFB: 6ES7 355-0VH10-0AE0 FM 355S MLFB: 6ES7 355-1VH10-0AE0 Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-9 A.1.3 Industrial Ethernet Industrial Ethernet Communication Machine-Readable S7 Functions ISO Transport ISO-on-TCP Partner Product Designation (MLFB) SFBs HMI S7-200 CPU 215 6ES7 215-2AD00-0XB0 - - - - 6ES7 215-2BD00-0XB0 - - - - S7-300 CPU 312 IFM 6ES7 312-5AC00-0AB0 CPU 313 6ES7 313-1AD00-0AB0 6ES7 313-1AD01-0AB0 CPU 314 6ES7 314-1AE00-0AB0 6ES7 314-1AE01-0AB0 6ES7 314-1AE02-0AB0 CPU 314 IFM 6ES7 314-5AE00-0AB0 S via S via C/S via C/S via 6ES7 314-5AE01-0AB0 CP 343-1 CP 343-1 CP 343-1 CP 343-1/TCP CPU 315 6ES7 315-1AF00-0AB0 or 6ES7 315-1AF01-0AB0 CP 343-1/TCP CPU 315-2 DP 6ES7 315-2AF00-0AB0 6ES7 315-2AF01-0AB0 FM 353 6ES7 353-1AH00-0AE0 - - 6ES7 353-1AH01-0AE0 - - FM 354 6ES7 354-1AH00-0AE0 - - 6ES7 354-1AH01-0AE0 - - FM 355 C 6ES7 355-0VH00-0AE0 - - 6ES7 355-0VH10-0AE0 - - FM 355 S 6ES7 355-1VH00-0AE0 - - 6ES7 355-1VH10-0AE0 - - M7-300 CPU 388-4 6ES7 388-4BN00-0CA0 C/S via C/S via - - FM 356-4 6ES7 356-4BM00-0AE0 CP 343-1 or CP 343-1 - - 6ES7 356-4BN00-0AE0 CP 343-1/TCP - - Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-10 Industrial Ethernet Communication Machine-Readable S7 Functions ISO Transport ISO-on-TCP Partner Product Designation (MLFB) SFBs HMI S7-400 CPU 412-1 6ES7 412-1XF0.-0AB0 CPU 413-1 6ES7 413-1XG0.-0AB0 CPU 414-1 6ES7 414-1XG0.-0AB0 CPU 416-1 6ES7 413-2XJ0.-0AB0 C/S via S via C/S via C/S via CPU 413-2DP 6ES7 413-2XG0.-0AB0 CP 443-1 or CP 443-1 CP 443-1 CP 443-1/TCP CPU 414-2DP 6ES7 414-2XG0.-0AB0 CP 443-1/TCP 6ES7 414-2XJ00-0AB0 CPU 416-2DP 6ES7 416-2XK00-0AB0 6ES7 416-2XL00-0AB0 M7-400 CPU 486-3 6ES7 486-3AA00-0AB0 C/S via C/S via - - CPU 488-3 6ES7 488-3AA00-0AB0 CP 443-1 or CP 443-1 - - FM 456-4 6ES7 456-4EY00-0AE0 CP 443-1/TCP - - C7-620 C7 621 6ES7 621-1AD00-0AE3 - - - - C7 623 6ES7 623-1AE00-0AE3 - - - - C7 623 a 6ES7 623-1CE00-0AE3 - - - - C7 624 6ES7 624-1AE00-0AE3 - - - - C7 626 6ES7 626-1AG00-0AE3 - - - - C7 626 a 6ES7 626-1CG00-0AE3 - - - - C7 626 DP 6ES7 626-2AG00-0AE3 - - - - OPs (with ProTool V 3.x) OP 7/DP 6AV3 607-1JC20-0XA0 - - - - OP 7/DP-12 6AV3 607-1JC30-0XA0 - - - - OP 17/DP 6AV3 617 1JC20-0XA0 - - - - OP 17/DP-12 6AV3 617 1JC30-0XA0 - - - - OP 25 6AV3 525-1EA.1-0AX0 - - - - OP 35 6AV3 535-1FA01-0AX0 - - - - OP 37 6AV3 637-1 .L00-0 . X0 - - - - OPs (with ProTool < V 3.x) OP 3 6AV3 503-1DB10 - - - - OP 5/A2 6AV3 505-1FB12 - - - - OP 15/A2 6AV3 515-1EB32-1AA0 - - - - OP 15/C2 6AV3 515-1MA22-1AA0 - - - - OP 7/DP 6AV3 607-1JC20-0XA0 - - - - OP 7/DP-12 6AV3 607-1JC30-0XA0 - - - - OP 17/DP 6AV3 617 1JC20-0XA0 - - - - OP 17/DP-12 6AV3 617 1JC30-0XA0 - - - - OP 25 6AV3 525-1EA.1-0AX0 - - - - Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-11 Industrial Ethernet Communication Machine-Readable S7 Functions ISO Transport ISO-on-TCP Partner Product Designation (MLFB) SFBs HMI OP 35 6AV3 535-1FA01-0AX0 - - - - OP 37 6AV3 637-1. L00-0 .X0 - - - - Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-12 A.2 Technical Data A.2.1 SIMATIC S7-200 Module Type CPU Module CPU 212 CPU 214 CPU 215 CPU 216 Interfaces Network Number PPI 1 PPI 1 PPI 2 PPI 2 Technical data Interface Transmission rate: S7 functions ASCII PROFIBUS-DP RS 485 9.6 Kbit/s 300 bit/s to 19.2 Kbit/s - RS 485 9.6 Kbit/s 300 bit/s to 38.4 Kbit/s - RS 485 9.6 Kbit/s or 19.2 Kbit/s 300 bit/s to 38.4 Kbit/s up to 12 Mbit/s RS 485 9.6 Kbit/s or 19.2 Kbit/s 300 bit/s to 38.4 Kbit/s - Communication services S7 functions Number of active links Number of stations 1 31 (127 with repeater) 8 31 (127 with repeater) 8 31 (127 with repeater) 8 31 (127 with repeater) ASCII Number of active links Number of stations Specified in user program Specified in user program Specified in user program Specified in user program Specified in user program Specified in user program Specified in user program Specified in user program Services for simultane- ous execution 1 service/cycle 1 service/cycle 1 service/cycle 1 service/cycle CPU loading PPI ASCII mode PPI ASCII mode PPI master PPI ASCII mode PPI ASCII mode PPI master Extension of the user program cycle, approx. < 1% Depends on user program < 1% Depends on user pro- gram - 6% < 1% Depends on user program < 1% Depends on user program 6% Extension of the inter- rupt response time, approx. - - - - - - - - - Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-13 A.2.2 SIMATIC S7-300 Module type CPU Module CPU 312-IFM CPU 313 CPU 314/-IFM CPU 315 CPU 315-2DP Interfaces Network Number MPI 1 MPI 1 MPI 1 MPI 1 MPI 1 PROFIBUS 1 Technical data Interface Transmission rate Galvanic isolation to LAN RS 485 187.5 Kbit/s No RS 485 187.5 Kbit/s No RS 485 187.5 Kbit/s No RS 485 187.5 Kbit/s No RS 485 187.5 Kbit/s No RS 485 12 Mbit/s Yes Link resources S7 functions (incl. programming device/OP) Number of links max. Client/server Communication via SFCs Number of links max. 4 Server - 4 Server 4 4 Server 8 4 Server 8 4 Server 8 Global data (GD) Number of GD circles Useful data in bytes/of which consistent 4 22/8 4 22/8 4 22/8 4 22/8 4 22/8 - - DP Number of slaves Useful data in bytes - per station/of which consistent - total 64 122/32 2 Kbyte CPU loading Program cycle is lengthened in accordance with the communication loading parameterizable by: Extension of interrupt response time 10 to 50% - 10 to 50% - 10 to 50% - 10 to 50% - 10 to 50% - Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-14 Module Type CP Module CP 343-1 CP 343-1 TCP CP 342-5 CP 343-5 Interfaces Network Number Industrial Ethernet 1 Industrial Ethernet 1 PROFIBUS 1 PROFIBUS 1 Technical data Interface Transmission rate Galvanic isolation to LAN AUI/ITP 10 Mbit/s Yes AUI/ITP 10 Mbit/s Yes RS 485 9.6 Kbit/s to 1.5 Mbit/s Yes RS 485 9.6 Kbit/s to 1.5 Mbit/s Yes Number of links via all services 32 32 32 48 Communications services S7 functions 1) Max. no. of links 16 16 16 16 SEND/RECEIVE Number of links Client/Server Useful data in bytes/of which consistent 16 Client/Server 240/240 16 Client/Server 240/240 16 Client/Server 240/240 16 Client/Server 240/240 FMS Number of links Client/Server - - - 16 Client/Server DP Number of slaves Useful data in bytes/of which consistent - - 64 240/240 - CPU loading Extension of user program cycle - Additional time for FB call Extension of interrupt response time - S7 functions - SEND/RECEIVE - FMS / DP 10 to 50% No Yes - 10 to 50% No Yes - 10 to 50% No Yes Yes 10 to 50% No Yes Yes 1) The S7 functions are passed on from the LAN to the CPU and vice-versa. For a detailed list of services, see CPUs. Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-15 A.2.3 SIMATIC S7-400 Module Type CPU Module CPU 412-1 CPU 413-1 CPU 413-2 DP CPU 414-1 CPU 414-2 DP CPU 416-1 CPU 416-2 DP Interfaces Network Number MPI 1 MPI 1 MPI 1 DP 1 MPI 1 MPI 1 DP 1 MPI 1 MPI 1 DP 1 Technical data Interface RS 485 RS 485 RS485 RS485 RS 485 RS485 RS485 RS 485 RS485 RS485 Transmission rate 187.5 Kbit/s 187.5 Kbit/s 187.5 Kbit/s 12 Mbit/s 187.5 Kbit/s 187.5 Kbit/s 12 Mbit/s 187.5 Kbit/s 187.5 Kbit/s 12 Mbit/s Galvanic isolation to LAN No No No Yes No No Yes No No Yes Communication services S7 functions (incl. programming device/OP) Client/Server Max. no. of links Useful data in bytes/of which consis- tent C/S 16 480/32 C/S 16 480/32 C/S 16 480/32 C/S 32 480/32 C/S 32 1) 480/32 C/S 64 480/32 C/S 64 1)
2) 480/32 Global data (GD) Number of GD circles Useful data in bytes/of which consis- tent 8 54/32 8 54/32 8 54/32 8 54/32 8 54/32 16 54/32 16 54/32 DP Number of slaves Useful data in bytes - per station/ of which consistent - total - 64 122/ 122 2 K - 96 122/ 122 4 K 96 122/ 122 4 K CPU loading Program cycle is lengthened in accor- dance with the communication loading parameterizable by: Extension of interrupt response time 10 to 50% - 10 to 50% - 10 to 50% - 10 to 50% - 10 to 50% - 10 to 50% - 10 to 50% - 1) A maximum of 16 S7 connections (e.g. OPs) can be realized via the internal DP interface of the CPU. 2) A maximum of 44 S7 connections can be realized via the MPI interface of the CPU. Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-16 Module Type CP Module CP 443-1 CP 443-1 TCP CP 443-5 Basic CP 443-5 Extended Interfaces Network Number Industrial Ethernet 1 Industrial Ethernet 1 PROFIBUS 1 PROFIBUS 1 Technical data Interface Transmission rate Galvanic isolation to LAN AUI/ITP 10 Mbit/s Yes AUI/ITP 10 Mbit/s Yes RS 485 9.6 Kbit/s to 12 Mbit/s Yes RS 485 9.6 Kbit/s to 12 Mbit/s Yes Number of links via all services without PROFIBUS-DP with PROFIBUS-DP 64 64 48 59, no time-of-day synch. 58, time-of-day synch. 55, no time-of-day synch. 54, time-of-day synch. Communication services S7 functions Max. no. of links 48 48 32 32 SEND/RECEIVE Max. no. of links Client/Server Useful data in bytes/of which consistent 64 Client/Server 240/240 64 Client/Server 240/240 32 Client/Server 240/240 32 Client/Server 240/240 FMS Max. no. of links Client/Server Useful data in bytes/of which consistent - - - - - - 32 Client/Server Client 238/238 Server 238/32 16 Client/Server Client 238/238 Server 238/32 DP Number of slaves Useful data in bytes - per station/of which consistent - total - - - 125 244/ 2 or 4 for L, T com- mands, 240 with SFCs 4096 CPU loading Extension of the user program cycle plus time for conducting the communication: Extension of interrupt response time 10 to 50 % parameterizable No 10 to 50 % parameterizable No 10 to 50 % parameterizable No 10 to 50 % parameterizable No Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-17 A.2.4 SIMATIC M7-300/400 Module Type CPU FM Module CPU 388-4 CPU 488/486-3 FM 356-4 FM 456-4 Interfaces Network Number MPI 1 DP 1 with IF 964- DP MPI 1 DP 1 with IF 964-DP MPI 1 access via CPU DP 1 with IF 964-DP MPI 1 access via CPU DP 1 with IF 964- DP Technical data Interface RS485 RS485 RS485 RS485 RS485 RS485 RS485 RS485 Transmission rate 187.5 Kbit/s 12 Mbit/s 187.5 Kbit/s 12 Mbit/s 187.5 Kbit/s 12 Mbit/s 187.5 Kbit/s 12 Mbit/s Communication services S7 functions (incl. programming device/OP) Client/Server Max. no. of links Useful data in bytes max. C/S 64 942 C/S 64 942 C/S 64 942 C/S 28 942 Communication via M7-API functions Max. no. of links 56 56 56 26 Global data (GD) Number of GD circles Useful data in bytes/of which consistent - - - - DP Number of slaves Useful data in bytes - per station/ of which consistent - total - 96 122/ 122 2 K - 96 122/ 122 4 K - 96 122/ 122 2 K 96 122/ 122 4 K CPU loading Extension of the user program cycle plus time for conducting the communication: Extension of interrupt response time Not adjustable - Not adjustable - Not adjustable - Not adjustable - Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-18 Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-19 A.3 Performance Data A.3.1 Itroduction Response Time The response time for communication blocks (SFBs/SFCs) is determined from the time between sending a telegram and receiving the associated acknowledgement. The response time depends on the number of stations connected to the network and on the number and size of telegrams to be transmitted, as well as on the cycle time of the user program. Bar Graphs Response times are visualized in the form of bar graphs. The following table provides interpretation aids which are helpful for reading and un- derstanding the bar graphs. Criteria Typical Values The response times given in the bar graphs are typical values; deviations are possible due to different numbers of stations or because of different CPUs/CPs (i.e. CPUS/CPs not identical to those used for the measure- ments given here). Response times were measured at cycle times of approx.1 ms. During the measurements, only the corresponding communication functions were executed by the user program. 8 Stations The response times are valid for eight stations connected to the subnet. Comparison Response times for MPI, PROFIBUS and Industrial Ethernet are given side by side to facilitate comparison (For S7-300 and M7-300/400, only the MPI response times are given). Baud Rates Response times are valid for the following baud rates: MPI: 187.5 Mbaud PROFIBUS: 1.5 Mbaud Ind. Ethernet: 10 Mbaud Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-20 Modules The aforementioned response times are valid for the following modules: S7/M7 CPU/CP Reference No. S7-400 CPU 416-1 6ES7 416-1XJ01-0AB0 CP 443-5 6GK7 443-5FX00-0XE0 CP 443-1 6GK7 443-1BX00-0XE0 M7-400 CPU 488 6ES7 488-3AA00-0AB0 S7-300 CPU 315 6ES7 315-1AF01-0AB0 M7-300 CPU 388 6ES7 388-4BN00-0AB0 S7-200 (as communication partner) CPU 215-2 6ES7 215-2 .D00-0XB0 Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-21 A.3.2 Response Times for S7-400 SFB USEND Response times are valid for the following modules: for MPI: 2 x CPU 416 for PROFIBUS: 2 x CPU 416 via CP 443-5 for Ind. Ethernet: 2 x CPU 416 via CP 443-1 SFB USEND 29 43 65 144 28 31 37 57 17 20 23 41 0 20 40 60 80 100 120 140 160 8 64 160 400 useful data in bytes response time in ms MPI PROFIBUS Ind. Ethernet SFB BSEND Response times are valid for the following modules: for MPI: 2 x CPU 416 for PROFIBUS: 2 x CPU 416 via CP 443-5 for Ind. Ethernet: 2 x CPU 416 via CP 443-1 SFB BSEND 61 74 95 175 40 44 50 71 37 39 43 67 0 20 40 60 80 100 120 140 160 180 8 64 160 400 useful data in bytes response time in ms MPI PROFIBUS Ind. Ethernet Response times for larger amounts of useful data: Useful data MPI PROFIBUS Ind. Ethernet 800 Byte 350 ms 144 ms 133 ms 16 kByte 6,780 ms 2820 ms 2,635 ms 64 kByte 27,185 ms 11,275 ms 10,550 ms Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-22 SFB PUT/GET Response times are valid for the following modules: for MPI: 2 x CPU 416 for PROFIBUS: 2 x CPU 416 via CP 443-5 for Ind. Ethernet: 2 x CPU 416 via CP 443-1 SFB PUT/GET 56 70 89 167 39 42 49 72 35 37 42 67 0 20 40 60 80 100 120 140 160 180 8 64 160 400 useful data in bytes response time in ms MPI PROFIBUS Ind. Ethernet SFB PUT/GET zur S7-300 Response times are valid for the following modules: for MPI: CPU 416 and CPU 315 SFB PUT/GET 50 65 92 0 10 20 30 40 50 60 70 80 90 100 8 64 160 useful data in bytes response time in ms MPI Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-23 Communication within Subrack Response times are valid for the following modules: 2 x CPU 416 Communication within Subrack 8 8 8 13 15 16 16 23 15 15 16 26 0 5 10 15 20 25 30 8 64 160 400 useful data in bytes response time in ms USEND BSEND PUT/GET Response times for larger amounts of useful data: Useful data Response times 800 Byte 49 ms 16 kByte 975 ms 64 kByte 3,900 ms SFC X_SEND The following graph compares two different response times. With short response times, the connections are maintained; with longer response times, the connections are set up and cleared again for each data trans- mission. Response times are valid for the following modules: for MPI: 2 x CPU 416 SFC X_SEND 61 66 74 77 182 189 195 199 0 20 40 60 80 100 120 140 160 180 200 8 32 64 76 useful data in bytes response time in ms Connections remain C. are set up/cleared Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-24 SFC X_PUT/X_GET The following graph compares two different response times. With short response times, the connections are maintained; with longer response times, the connections are set up and cleared again for each data trans- mission. Response times are valid for the following modules: for MPI: 2 x CPU 416 and CPU 416 with CPU 215-2 SFC X_PUT/X_GET 56 62 66 73 178 189 195 199 200 200 200 200 600 600 600 600 0 100 200 300 400 500 600 8 32 64 76 useful data in bytes response time in ms Connections remain C. are set up/ cleared C. with 215-2 remain C. with 215-2 set up/cleared Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-25 A.3.3 Response Times for S7-300 SFC X_SEND The following graph compares two different response times. With short response times, the connections are maintained; with longer response times, the connections are set up and cleared again for each data trans- mission. Response times are valid for the following modules: for MPI: 2 x CPU 315 SFC X_SEND 48 48 53 60 202 206 213 216 0 50 100 150 200 250 8 32 64 76 useful data in bytes response time in ms Connections remain Conn. set up/cleared SFC X_PUT/X_GET The following graph compares two different response times. With short response times, the connections are maintained; with longer response times, the connections are set up and cleared again for each data trans- mission. Response times are valid for the following modules: for MPI: 2 x CPU 315 and CPU 315 with CPU 215-2 SFC X_PUT/X_GET 51 56 61 61 202 208 215 212 200 200 200 200 600 600 600 600 0 100 200 300 400 500 600 8 32 64 76 useful data in bytes response time in ms Connections remain C. are set up/cleared C. with 215-2 remain C with 215-2 set up/cleared Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-26 A.3.4 Response Times for M7-300/M7-400 SFB USEND Response times are valid for the following modules: for MPI: 2 x CPU 388 and 2 x CPU 488 SFB USEND 26 39 59 140 28 42 58 143 0 20 40 60 80 100 120 140 160 8 64 160 400 useful data in bytes response time in ms 388 488 SFB BSEND Response times are valid for the following modules: for MPI: 2 x CPU 388 and 2 x CPU 488 SFB BSEND 44 57 80 158 47 59 83 161 0 20 40 60 80 100 120 140 160 180 8 64 160 400 useful data in bytes response time in ms 388 488 Response times for larger amounts of useful data: Useful data CPU 388 CPU 488 800 Byte 315 ms 316 ms 16 kByte 6,085 ms 6,090 ms 64 kByte 23,015 ms 23,055 ms Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-27 SFB PUT/GET Response times are valid for the following modules: for MPI: 2 x CPU 388 and 2 x CPU 488 SFB PUT/GET 39 51 76 144 42 54 79 147 0 20 40 60 80 100 120 140 160 8 64 160 400 useful data in bytes response time in ms 388 488 SFC X_SEND The following graph compares two different response times. With short response times, the connections are maintained; with longer response times, the connections are set up and cleared again for each data trans- mission. Response times are valid for the following modules: fr MPI: 2 x CPU 388 und 2 x CPU 488 SFC X_SEND 44 49 57 59 143 149 157 159 47 51 59 62 145 150 157 160 0 20 40 60 80 100 120 140 160 8 32 64 76 useful data in bytes response time in ms Connections remain 388 C. are set up/cleared 388 Connections remain 488 C. are set up/cleared 488 Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-28 SFC X_PUT/X_GET The following graph compares two different response times. With short response times, the connections are maintained; with longer response times, the connections are set up and cleared again for each data trans- mission. Response times are valid for the following modules: for MPI: 2 x CPU 388 and CPU 388 with CPU 215-2 SFC X_PUT/X_GET 38 45 52 54 140 145 152 155 100 100 100 100 300 300 300 300 0 50 100 150 200 250 300 8 32 64 76 useful data in bytes response time in ms Connections remain C. are set up/cleared C. with 215 remain C. with 215 set up/cleared SFC X_PUT/X_GET The following graph compares two different response times. With short response times, the connections are maintained; with longer response times, the connections are set up and cleared again for each data trans- mission. Response times are valid for the following modules: for MPI: 2 x CPU 488 and CPU 488 with CPU 215-2 SFC X_PUT/X_GET 45 48 54 57 145 150 157 160 100 100 100 100 400 400 400 400 0 50 100 150 200 250 300 350 400 8 32 64 76 useful data in bytes response time in ms Connections remain C. are set up/cleared C. with 215 remain C. with 215 set up/cleared Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-29 Glossary Address An address is the designation for a specific operand or operand area, e.g. input I12.1; flag word FW25; data block DB3. Address Assignment Assigning an address in the user program. Addresses can be assigned to specific operands or operand areas (e.g. input I12.1; flag word FW25). AT Advanced Technology. AT designates the PC standard of the second gen- eration, i.e. PCs with the ISA bus (16-bit data lines and 24-bit address lines), Intel processors >= 80286, two interrupt controllers and hard disk. BIOS Basic Input Output System - The term BIOS refers to the part of the soft- ware that establishes the link between the hardware and the operating system drivers. The BIOS translates the hardware base into an abstract; the associated software is stored in an EPROM. The most important com- ponents are, for example, the loader for the boot sector, the (hardware) SETUP for specifying the hardware configuration and for setting the time of day. Client/Server Principle When data is exchanged in accordance with the client/server principle, the client always issues the communications tasks and the server executes them. COM Configuration Management - Configuration software for SIMATIC NET communication processors. Complete Restart When a CPU starts up (following mode switching from STOP to RUN or by switching ON at the main switch), and before cyclic program processing starts (OB1), either the organization block OB101 (warm restart, only for S7-400) or the organization block OB 100 (complete restart) is first proc- essed. In the case of a complete restart, the process image of the inputs is read in and the STEP 7 user program is executed starting with the first command in OB1. Configuration This is the installation-specific combination of hardware and/or software components. Configuring This is the process of selecting and combining the separate components of an automation system or installing the required software (e.g. operating system on the M7 automation computer) and adapting it to the specific application (e.g. by parameterizing the modules). Control Command FREEZE The DP master sends the control command FREEZE to a group of DP slaves and causes the DP slaves to freeze the status of their inputs at the current value. Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-30 Control Command SYNC The DP master sends the control command SYNC to a group of DP slaves and causes the DP slaves to synchronize the status of their outputs. CP Communication Processor - Communication module for installing in a computer or programmable controller. CPU (Central Processing Unit) The CPU is the central processing unit of the programmable controller or computer comprising control and computing mechanisms, memory, op- erating system and interfaces to signal modules and function modules. Cycle Time The cycle time is the time that the CPU requires for processing the user program once. Data Block (DB) In technical terms, a data block is a block of data whose operand is loaded into the address register of the DB on opening. It provides memory space and data for all (global) code blocks (FC, FB or OB) that are to be exe- cuted. In contrast, the task of an instance data block is to act as special memory and data for the function block to which it has been assigned. Data Consistency Data area that can be read or written by the operating system as a block in the case of S7-300/400 CPUs (e.g. PUT/GET). This data area is inde- pendent of the size of useful data actually transferred by the communica- tions functions. An array of the data types byte, word or double word can be transferred consistent up to a maximum length that depends on the CPU used. DB Data blocks are data areas in the user program that contain user data. There are global data blocks that can be accessed by all code blocks and instance data blocks that are assigned to a specific FB call. DDE Dynamic Data Exchange - This is a communications mechanism that al- lows Windows applications running in parallel to communicate with each other. DDE makes a distinction between the server and the client. The client sends a task to the server via DDE which the server then executes. DLL Dynamic Link Library - This is a collection of functions that are available to several programs but which are only loaded into the memory once (Windows/Windows NT feature) DP Distributed I/O comprises input and output modules that are implemented decentralized with respect to the CPU (central processing unit of the controller). The SIMATIC system is linked to the distributed I/O via the PROFIBUS-DP bus system. DP Protocol Protocol used to transfer data to distributed I/O via a DP network -> PROFIBUS-DP. Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-31 DPRAM Dual Port Random Access Memory - This allows simultaneous access from two computing components (CP and CPU) on one memory module (RAM). ESD Guidelines Guidelines for the protection of Electrostatically Sensitive Devices. FB Function Blocks, according to the IEC 1131-3 standard, are "code blocks with memory". A function block allows parameters to be transferred to the user program. This means that FBs are especially suitable for program- ming frequently recurring complex functions such as closed-loop control and mode selection. Since an FB has a memory (instance data block) its parameters (e.g. outputs) can be accessed at any time and at any point in the user program. FCs Function Calls are in accordance with the IEC 1131-3 standard "code blocks without memory". A function call allows parameters to be trans- ferred to the user program. This means that function calls are especially suitable for programming frequently recurring complex functions such as calculations. Important: Due to the lack of memory, the calculated values must be processed immediately after the FC call. FDL Fieldbus Data Link - Layer 2 of the ISO reference model in the case of PROFIBUS; it comprises the sublayers "Fieldbus Link Control" (FCL) and "Medium Access Control" (MAC). FM A Function Module (FM) is a module that relieves loading on the CPU in the S7-300 and S7-400 programmable controllers caused by time-critical or memory-intensive process signal processing tasks. FMs usually use the internal communications bus for high-speed data exchange with the CPU. Examples of FM applications include counting, positioning and closed-loop control. FMS Fieldbus Message Specification - This constitutes the upper sublayer of Layer 7 of the ISO reference model for PROFIBUS; it comprises the pro- tocol machine functions, generating the -> PDUs as well as encod- ing/decoding and interpretation of the protocol data unit. FMS Protocol Protocol for data transfer via the PROFIBUS network in accordance with the Fieldbus Message Specification. HMI Human-machine interface: HMI systems can access the data areas of an S7 CPU or S7 objects of an M7. Process data can be visualized appropri- ately on HMI systems and operator control of installations is possible. IM Interface Module (input/output module) Industrial Ethernet Bus system for industrial use based on Ethernet (previously called SINEC H1). Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-32 Installation The installation is the sum total of all electrical equipment. An installation includes programmable controllers, human-machine interfaces, bus sys- tems, field devices, drives, supply leads. Instance This constitutes the call for a function block. Supposing a function block is called five times in the STEP 7 user program, then five instances exist. An instance data block is assigned to each call. Instance Data Block (DB) An instance data block stores the formal parameters and static local data for function blocks. An instance data block can be assigned to an FB call or to a call hierarchy of function blocks. IRQ Interrupt Request ISA Industrial System Architecture - PC bus standard; ISA bus - Expansion bus for XT and AT computers (standardized 16-bit data and 24-bit address bus). ISO International Standard Organization - International organization based in Geneva which produces general standards, especially in the data trans- mission field. Link Table Tables for defining the communication links between programmable mod- ules in a network. Load into PLC Loadable objects (e.g. code blocks) are loaded from the programming device into the load memory of a programmable module. This can take place via a programming device that is directly connected to the CPU or, for example, via PROFIBUS. Load into Programming Device Loadable objects (e.g. code blocks) are loaded from the load memory of the CPU into the programming device. This can take place via a pro- gramming device that is directly connected to the CPU or, for example, via PROFIBUS. Logical Address This is the address under which a user program in the PLC can access an I/O signal. Logical Base Address Logical address of the first I/O signal of a module. M7 RMOS32 M7 RMOS32 is the 32-bit real-time multi-tasking operating system for the M7 automation computer. M7 RMOS32 contains the M7 RMOS32 kernel and the M7 server as well as utility programs (RT, RFS, CLI, Debugger) and libraries (C runtime library, DDE communication, RMOS-DOS/- Windows communication). Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-33 M7API M7API (Application Programming Interface) is the call interface that is available to an M7 RMOS32 user program for the purpose of using the services of the M7 server. Memory Reset (MRES) The following memory areas of the CPU are reset on memory reset: User memory Read/write area of the load memory System memory with the exception of the MPI parameters and the diagnostics buffer. MPI The Multi Point Interface is the programming device interface for SIMATIC S7. It allows simultaneous use of several programming devices, text displays and operator panels on one or more CPUs. The stations connected to MPI are interconnected via a bus system. MPI Address In an MPI network, a unique MPI address has to be assigned to each programmable module. MS-DOS Microsoft Disk Operating System is an operating system produced by the Microsoft company. In the case of M7 RMOS32, the MS-DOS operating system as well as an MS-DOS application can execute as an autonomous, low-priority M7 RMOS32 task. Network A network comprises one or more coupled subnets with any number of stations. Several networks can exist alongside each other. A common node table exists for each subnet. Network Transition This is a connection point between subnets that belong to an overall net- work. This can also be a transition between subnets/networks that have different characteristics (e.g. transition between PROFIBUS and Industrial Ethernet). OCX OLE Custom Controls OLE Object Linking and Embedding is the central architectural principle of the Windows versions Windows 95 and Windows NT 3.5 as well as forming the basis of the Windows applications software under Windows for Work- groups 3.11. OLM Optical Link Module Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-34 Operating Mode The following operating modes can be set using the operating mode switch on the CPU : RUN with access to the STEP 7 user program, e.g. using the pro- gramming device (RUN-P) RUN with access protection (RUN) STOP and Memory reset (MRES). Operating State The SIMATIC S7 system family features five different operating states: MEMORY RESET, STOP, START-UP, HALT and RUN. In the case of M7, the operating states are processed by the OMT server. The M7 RMOS32 user program can only take into account the operating states of the M7 when it is explicitly informed by the OMT server or FC server (only for START-UP and RUN). Operating State RUN In the RUN operating state, the user program is executed and the process image is updated cyclically. All digital outputs are enabled. Operating State HALT Changeover to the HALT operating state takes place from the RUN state in response to a request from the programming device. In this operating state, special test functions are possible. Operating State START-UP The START-UP operating state is executed during transition from the STOP operating state to the RUN operating state. It can be triggered by the mode switch or following network ON or by entering commands at the programming device. In the case of the S7-300 a complete restart takes place. In the case of the S7-400, either a complete restart or a warm re- start takes place depending on the position of the start-up mode switch. Operating State STOP Changeover to the STOP state takes place as a result of: Operating the operating mode switch An internal fault on the CPU A command entered at the programming device In the "STOP" operating state, the user program does not execute. All modules are switched into a safe state. Certain programming functions and operator control and visualization functions are possible. Operating System This is an overall designation for all functions that control and monitor execution of the user programs, distribution of resources among the sepa- rate user programs, and maintaining the operating mode in cooperation with the hardware (e.g. MS-DOS). Parameterization Parameterization is the process of setting the response for a module. Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-35 PC Personal Computer PCMCIA Personal Computer Memory Card International Association - Association of about 450 member companies in the computer sector that aims to specify worldwide standards for the miniaturization and flexible use of PC expansion cards and to make this standard technology available on the market. It cooperates with JEIDA (PC card standard for compact PC ex- pansion modules). PDU Protocol Data Unit PG Programming device for the SIMATIC product family of Siemens AG; used for programming, configuration, maintenance and for service. PLC Programmable Logic Controller - PLCs are electronic controllers whose functions are stored in the controller in the form of a program. Their hardware configuration and wiring is therefore independent of the function of the controller. The PLC has the structure of a computer; it comprises a CPU with memory, input/output modules and an internal bus. The peripherals and the programming language are optimized for the controller technology. Procedure The sequence for data transfer in accordance with a specific technique in ISO level 2 is also termed a procedure in the case of the point-to-point link. Process Image The signal states for the digital input and output modules are stored in the CPU in a process image. A distinction is made between the process image for the inputs (PII) and the process image for the outputs (PIO). Process Image for the Inputs (PII) The process image for the inputs is read from the input modules by the operating system before the user program is executed. Process Image for the Outputs (PIO) The process image for the outputs is transferred to the output modules at the end of the user program by the operating system. PROFIBUS Process Field Bus - A fieldbus to the EN 50170 standard Vol. 2 PROFIBUS (DIN 19245; bus system for industrial use based on PROFIBUS; previously known as SINEC L2). PROFIBUS-DP DP operating mode to DIN E 19245, Part 3; PROFIBUS-DP is a serial bus, specially developed by SIEMENS for the field level used to link to distant (distributed) I/O (previously know as L2/DP). Project An S7 project encompasses all objects of an automation solution regard- less of the number of stations, modules and their networking. Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-36 Protocol This is a procedural specification for the process of transferring data. It defines both the formats of the messages and the data flow during trans- fer. Rack A rack is a module rack comprising slots in which modules are inserted. S7 Manager STEP 7 tool. All configuration and parameterization required for a SIMATIC S7 system can be performed under the user interface of the S7 Manager. S7 Object S7 objects on an M7 represent the operand area of an S7 CPU. Via S7 objects, an M7 can communicate with other SIMATIC components (e.g. HMI systems, programming devices, S7 CPUs). S7 objects are created and managed by the "Object server". S7 objects of an M7 comprise, for example, all process data, data blocks or bit memory areas. S7 PLC This is an abbreviation for a programmable logic controller of the SIMATIC S7 product family of Siemens AG. S7 Program The S7 program encompasses blocks, source code and schedules for programmable S7 modules. S7 Protocol The S7 protocol (also known as "S7 communication" or "S7 functions") forms a simple and efficient interface between SIMATIC S7 stations and to the programming device or PC. SCSI Small Computer System Interface - Interface for connecting SCSI devices (e.g. hard disk drives, CD-ROM drives). Services These are the services offered by a communication protocol. SIMATIC Manager Graphical user-interface for SIMATIC users under Windows 95. SIMATIC NET Siemens product name for networks and network components (previously SINEC). SINEC Siemens Network and Communication -> SIMATIC NET. SINEC H1 -> Industrial Ethernet SINEC L2 -> PROFIBUS Standard Function Block Standard function blocks are function blocks which can be purchased from Siemens. They form, for example, the interface between the user program and complex I/O modules or between the user program and the communi- cations processor. Standard function blocks are also available for closed- loop control, alarm functions, operator control and process visualization, arithmetic, Graph 5 and complex mathematical functions. Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-37 START-UP The START-UP operating state is the transition from the STOP operating state to the RUN operating state. In the START-UP state, some pro- gramming may be required specifically for preparing for process control in the RUN state. Station This is a complete unit that can be connected to one or more subnets, e.g. programmable controller, programming device, operator station. Station Address A unit (e.g. programming device) or a programmable module (e.g. CPU) can be accessed in a subnet (e.g. MPI, PROFIBUS) via the station ad- dress. Subnet This is the sum total of all physical components that are required to estab- lish a data transmission path, as well as the common procedure required to transfer data. The stations on a subnet are interconnected without the need for network transitions. The physical entirety of a subnet (MPI, PROFIBUS, Industrial Ethernet) is also known as the transfer medium. System Data Block (SDB) System data blocks are data blocks in the CPU which contain system set- tings and module parameters. The system data blocks are generated and modified on configuration. System Function (SFC) A system function (SFC) is a function that is integrated into the operating system of the CPU and that can be called up in the STEP 7 user program if necessary. System Function Block (SFB) A system function block (SFB) is a function block that is integrated into the operating system of the CPU and that can be called up in the STEP 7 user program if necessary. User Program The user program contains all instructions and declarations as well as data for the signal processing that is used to control an installation or a process. It is associated with a programmable module (e.g. CPU, FM) and can be structured into smaller units (blocks). Variable A variable is a data item with a variable content that can be used in the STEP 7 user program. A variable comprises an operand (e.g. M 3.1) and a data type (e.g. Bool) and can be identified by a symbol (e.g. BAND_EIN). VBA Visual Basic for Applications VBX Visual Basic Extension - Extension of Visual Basic for developing user- specific operator control elements. VMD Virtual Manufacturing Device - This is the abstraction of a device whose characteristics are represented by a section of the application. Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-38 Warm Restart When a CPU starts up (e.g. following changeover of the mode switch from STOP to RUN or by switching ON at the main switch) either the organiza- tion block OB 100 (complete restart) or the organization block OB 101 (warm restart, only for S7-400) is processed before cyclic program proc- essing starts (OB 1). In the case of a warm restart, the process image of the inputs is read in and execution of the STEP 7 user program is contin- ued, starting from the point at which is was previously interrupted (via STOP or POWER OFF). Warm Start A warm start is a restart that takes place after a program has aborted. The operating system is reloaded and restarted. A warm start can be activated using the key combination CTRL + ALT + DEL. Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-39 To: Siemens AG AUT E 148 PO Box 1963 D-92209 Amberg Germany Sender: Name:--------------------------------------------------------------------------------------------------------------------- Position: ----------------------------------------------------------------------------------------------------------------- Company:---------------------------------------------------------------------------------------------------------------- Address: ------------------------------------------------------------------------------------------------- Town: ---------------------------------------------------------------------------------------------------- Tel.:------------------------------------------------------------------------------------------------------- Please mark the sector of industry that is applicable for your company: Y Motor industry Y Pharmaceutical industry Y Chemicals industry Y Plastics Y Electrical industry Y Paper industry Y Food processing industry Y Textile industry Y I&C Y Transport Y Mechanical engineering Y Other _______________________ Y Petrochemicals Appendix Communication with SIMATIC EWA 4NEB 710 6075-02a A-40 Remarks/Suggestions Your remarks and suggestions help us to improve the quality and usefulness of our documentation. Please fill out this questionnaire at the next available opportunity and send it back to Siemens. We invite you to grade our manual on a point system from 1 = good to 5 = poor. 1. Do the contents of the manual live up to your expectations? Y 2. Is the information easy to find? Y 3. Are the texts easy to understand? Y 4. Does the level of technical detail meet your requirements? Y 5. How would you assess the quality of the graphics and tables? Y
If you have found any specific shortcomings, please explain below: ----------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------- Y