Siemens SIMATIC NET S7-300 Manual
Siemens SIMATIC NET S7-300 Manual

Siemens SIMATIC NET S7-300 Manual

Cps for industrial ethernet
Hide thumbs Also See for SIMATIC NET S7-300:
Table of Contents

Advertisement

Quick Links

SIMATIC NET
S7-CPs for Industrial Ethernet
Configuring and Commissioning
Manual
Part A - General Application
Release 01/2007
C79000 - G8976 - C182 - 07
Preface, Contents
Communication in S7 Stations
Characteristics of the Ethernet
CPs
Commissioning an Ethernet CP
SEND/RECEIVE
interface
Configuring Connections
Programmed Connections
FCs (Functions) and FBs
NCM S7 Diagnostics
Firmware Loader
Appendix A - E / Index
1
2
3
4
5
6
7
8
9

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SIMATIC NET S7-300

  • Page 1 Preface, Contents Communication in S7 Stations Characteristics of the Ethernet Commissioning an Ethernet CP SIMATIC NET SEND/RECEIVE interface S7-CPs for Industrial Ethernet Configuring Connections Configuring and Commissioning Programmed Connections FCs (Functions) and FBs Manual NCM S7 Diagnostics Part A - General Application Firmware Loader Appendix A - E / Index Release 01/2007...
  • Page 2 Classification of Safety-Related Notices This manual contains notices which you should observe to ensure your own personal safety, as well as to protect the product and connected equipment. These notices are highlighted in the manual by a warning triangle and are marked as follows according to the level of danger: Danger indicates that death or severe personal injury will result if proper precautions are...
  • Page 3 Siemens. This product can only function correctly and safely if it is transported, stored, set up, and installed correctly, and operated and maintained as recommended.
  • Page 4 For ordering data of the documentation please refer to the catalogs or contact your local SIEMENS representative. Copyright E Siemens AG 2001- 2007 All rights reserved Disclaimer of Liability The reproduction, transmission or use of this document or its contents is not We have checked the contents of this manual for agreement with the permitted without express written authority.
  • Page 5 This manual..supports you when commissioning your SIMATIC NET CP modules in an S7 station..supports you so that your applications can communicate successfully and efficiently over the SIMATIC NET CPs..in tandem with the “Primer” description, provides you with all the information you require to implement your communications tasks: Description Manual...
  • Page 6 This manual... Audience This manual is intended for personnel responsible for installing and programming STEP 7 programs and for service personnel. Scope of this Manual This manual applies to version V5.x and higher of the NCM S7 configuration software and to version V5.x and higher of the STEP 7 software. Notice If functions are described that require higher versions, this is indicated by an additional icon.
  • Page 7 Title Content / Web Addresses Configuring and This is available on the Web at: Commissioning S7-CPs General Section for Industrial Ethernet http://www4.ad.siemens.de/view/cs/en/8777865 Manual Device descriptions CP 343 -1 Lean (CX00): http://www4.ad.siemens.de/view/cs/en/19308657 CP 343 -1 Lean (CX10): http://www4.ad.siemens.de/view/cs/en/23643456 CP 343-1 (EX21): http://www4.ad.siemens.de/view/cs/en/22259495...
  • Page 8 Internet technology. IT/CP 443-1 Advanced This is available on the Web at: Manual http://www4.ad.siemens.de/view/cs/en/1172744 Commissioning PC The manual supports you and helps you to make efficient use of Stations communications with your PC applications in conjunction with the SIMATIC NET modules.
  • Page 9 For new user programs, please make sure that you use the latest block versions. You will find information on the current block versions and the current blocks to download from the Internet at: http://www4.ad.siemens.de/view/cs/en/8797900 If you require replacements, please follow the instructions in the device-specific Part B of this manual.
  • Page 10 This manual... Symbols Used in this Manual Unless indicated otherwise, the functions described in this manual assume the use of STEP 7. This symbol is used to indicate functions that require a specific version of STEP 7 or higher, for example Version V5.2. This symbol appears in the margin to draw your attention to useful tips.
  • Page 11 Contents Contents Contents - Part A 1 Communication via Ethernet CPs in S7 Stations ......A-15 Industrial Ethernet .
  • Page 12: Table Of Contents

    Contents 2.5.4 Removing / Inserting (Replacing Modules) ..... . . A -56 2.5.5 Note on the S7-400 CPU: Connection Resources .
  • Page 13 Contents 5.6.3 Checking TCP Connection Properties ......A -138 Configuring UDP Connection Properties ......A -139 5.7.1 Specifying the Local Connection Endpoint...
  • Page 14 Contents 7.8.7 FB 54 PNIO_ALARM ......... A -256 Configuration Limits / Resources Required by the FCs and FBs .
  • Page 15 1 Communication via Ethernet CPs in S7 Stations The Ethernet CP for SIMATIC S7 provides a series of communications services for different tasks. This chapter explains the following: S The types of communication possible with the Ethernet CP on Industrial Ethernet S The tasks handled by the Ethernet CP for the various services S How to create the conditions for your communications requirements...
  • Page 16 1 Communication via Ethernet CPs in S7 Stations Industrial Ethernet Definition Within the open, heterogeneous SIMATIC NET communication system, Industrial Ethernet is the network for the management and cell level. Physically, Industrial Ethernet is an electrical network that uses a shielded coaxial cable or twisted pair, or an optical network with fiber-optic cables.
  • Page 17 1 Communication via Ethernet CPs in S7 Stations SIMATIC S7 Communication with S7 Ethernet CPs 1.2.1 Types of Communication The Ethernet CP for SIMATIC S7 supports the following types of communication depending on the CP type: Ethernet CP Ethernet CP S7-400 S7-300 Interfaces / Services /...
  • Page 18 1 Communication via Ethernet CPs in S7 Stations S PG/OP communication PG/OP communication is used to download programs and configuration data, to run tests and diagnostic functions, and to control and monitor a plant from OPs. S S7 communication S7 communication forms a simple and efficient interface between SIMATIC S7 stations and PGs/PCs using communication function blocks.
  • Page 19 1 Communication via Ethernet CPs in S7 Stations With the S7 CPs that support the PROFINET IO device mode, S7 stations can be operated as ”intelligent” PROFINET IO devices on Industrial Ethernet. For more detailed information on PROFINET IO, refer to /20/ and /21/. For PROFINET IO communication, TCP connections are used to set the parameters and RT (real time) or IRT (isochronous real time) for the cyclic IO data exchange.
  • Page 20 1 Communication via Ethernet CPs in S7 Stations 1.2.2 The Communication Services of Ethernet CPs Depending on the module type, the S7-CPs support the following communication options: Automation system Supported functions PG/OP S5 - PROFINET compatible tibl Module CP 343 -1 Lean S7/C7-300 CP 343 -1 CP 343-1...
  • Page 21 1 Communication via Ethernet CPs in S7 Stations Possibilities for Communication between Device Types The possible communication available with the types of communication listed above is shown in the following table: PC station S7-400 S5-115 to -155U/H S7-300 PG/OP- S7 communication S7 communication SEND/RECEIVE S7-300...
  • Page 22 1 Communication via Ethernet CPs in S7 Stations 1.2.3 Operation Using a Configured or Programmed Database Configuration and Diagnostics To connect and configure the Ethernet CP, you require the STEP 7 configuration software and the SIMATIC NET NCM S7 for Industrial Ethernet option. NCM S7 for Industrial Ethernet is installed as a STEP 7 option and is therefore integrated in STEP 7.
  • Page 23 1 Communication via Ethernet CPs in S7 Stations PG/OP Communication via Industrial Ethernet Application PG/OP communication provides functions that are already integrated in every SIMATIC S7/M7/C7 device. A distinction must be made between the following two types of function: S PG communication PG communication with STEP 7 PLCs on Industrial Ethernet means the following: - You can use the complete range of functions of STEP 7 on Industrial...
  • Page 24 1 Communication via Ethernet CPs in S7 Stations Operator Interface functions PC with Ethernet CP STEP 7 Ethernet attachment Modem / NCM S7 ISDN Create configuration data for every CP and download to the Ethernet CPs Ind. Ethernet Router S7 - 400 (e.g.
  • Page 25 1 Communication via Ethernet CPs in S7 Stations 1.3.1 PG Communication with STEP 7 over Industrial Ethernet Requirements for PG Communication PG communication is possible when the following requirements are met: S An Ethernet CP is installed in the PG or engineering station or there is a modem/ISDN interface for remote access.
  • Page 26 1 Communication via Ethernet CPs in S7 Stations 1.3.2 OP Operation: Connecting Operator Interface Devices via Industrial Ethernet Requirements Operation allowing operator interface functions is possible when the following conditions are met: S The following are installed in the operator control and monitoring device: - an Ethernet CP - SOFTNET S7 for Ind.
  • Page 27 1 Communication via Ethernet CPs in S7 Stations S7 Communication on Industrial Ethernet Application S7 communication via Industrial Ethernet allows program-controlled communication using communication SFBs/FBs via configured S7 connections. Per job, up to 64 Kbytes of user data can be transmitted. The Ethernet CP acts as an “S7 communication relay”...
  • Page 28 1 Communication via Ethernet CPs in S7 Stations S Client and server functionality at one end only (S7 connections configured at one end) In the following situations, write and read functions can be implemented with PUT / GET: - S7 communication over router PG/PC stations can access S7 stations if the PG/PC stations are connected to a different subnet or subnet type (PROFIBUS / Ethernet) via routers (for example, an IE/PB Link);...
  • Page 29 1 Communication via Ethernet CPs in S7 Stations Configuring S7 Connections Create S7 connections to use S7 communication for data exchange between two SIMATIC S7 stations. For more detailed information, refer to the STEP 7 Description /6/. Notice S7 connections via routers are supported only within a STEP 7 project but not between partners in different STEP 7 projects of a multiproject! Interface in the User Program of the S7 Station You use SFBs (for S7-400) and FBs (for S7-300) in the user program.
  • Page 30 1 Communication via Ethernet CPs in S7 Stations Notes on S7 Communication between PC/PG Station and S7 Station Applications in a PC/PG station communicate with the S7 station over an OPC interface or SAPI-S7 interface for operator intervention, monitoring and control. The S7 stations use the integrated communication SFBs/FBs (client and server functionality at both ends).
  • Page 31 1 Communication via Ethernet CPs in S7 Stations S5-compatible Communication (SEND/RECEIVE Interface) Application Using the SEND/RECEIVE interface, your S7 user program has access to S5-compatible communication with configured transport connections. Data transmission over a configured transport connection is suitable for the following types of transmission: S the reliable transmission of related blocks of data between two Ethernet nodes using...
  • Page 32 1 Communication via Ethernet CPs in S7 Stations IP (Internet Protocol) For internetwork data transmission, the following services are available with suitable CPs such as the CP 443-1: S ISO-on-TCP connection ISO-on-TCP is intended for reliable, internetwork data transmission. The ISO-on-TCP service corresponds to the TCP/IP standard (Transmission Control Protocol/Internet Protocol) with the RFC 1006 extension according to layer 4 of the ISO reference model (see /18/).
  • Page 33 1 Communication via Ethernet CPs in S7 Stations Stations The SEND/RECEIVE interface allows program-controlled communication on Industrial Ethernet between the SIMATIC S7 PLC and the following: S SIMATIC S7 PLC with Ethernet CP S SIMATIC S5 PLC with Ethernet CP S PC/PG with Ethernet CP S Other station with Industrial Ethernet attachment Ethernet CP...
  • Page 34 1 Communication via Ethernet CPs in S7 Stations FETCH/WRITE Services (Server) Application In addition to the SEND/RECEIVE interface, the FETCH/WRITE functionality provides further services for S5-compatible communication on configured transport connections. The FETCH/WRITE interface is used primarily to attach SIMATIC S7 to SIMATIC S5 and to other non-S7 stations (for example PCs).
  • Page 35 1 Communication via Ethernet CPs in S7 Stations Networking Stations with STEP 7 Configuring To allow stations to communicate with each other the networks must be configured in the STEP 7 projects. Configuring a network or subnet involves the following: 1.
  • Page 36 1 Communication via Ethernet CPs in S7 Stations Variants Before configuring networks with STEP 7, you should be aware of the various configurations possible in the STEP 7 project. The following configurations are typical for stations networked with CPs: Variant (examples) Characteristics/Configuration 1 subnet - 1 project Additional SIMATIC S5 stations and stations with equipment of other vendors...
  • Page 37 1 Communication via Ethernet CPs in S7 Stations 1.7.1 Network/Project Variant: One Subnet - One Project Configuration of the System In the simplest case, your system consists of SIMATIC S7 stations connected by one subnet, for example of the type Industrial Ethernet. S7-400/1 S7-300/1 System...
  • Page 38 1 Communication via Ethernet CPs in S7 Stations 1.7.2 Network/Project Variant: SIMATIC S5 and Non-SIMATIC Devices on the Subnet Configuration of the System In addition to SIMATIC S7 stations, SIMATIC S5 stations and non-SIMATIC devices can be included in your system. S7-400/1 S7-400/1 System...
  • Page 39 1 Communication via Ethernet CPs in S7 Stations 1.7.3 Network/Project Variant: Two or More Subnets - One Project Configuration of the System Due to the different tasks of the stations or due to the extent of the system it may be necessary to operate more than one network.
  • Page 40 1 Communication via Ethernet CPs in S7 Stations 1.7.4 Network/Project Variant: One Subnet - More Than One (Sub)Project Configuration of the System In complex networked systems, during configuration it is sometimes more efficient to manage plant sections in different (sub) projects. The situation can arise that communication takes place over an interproject subnet and that interproject connections must then also be created.
  • Page 41 1 Communication via Ethernet CPs in S7 Stations In this case, agreement is necessary, for example, regarding the assignment of connection names because it will be far easier when synchronizing the projects to bring connections with identical connection names together. The topic of multiprojects is dealt with in detail in the STEP 7 basic help.
  • Page 42 1 Communication via Ethernet CPs in S7 Stations Use this variant when you want to operate projects separately due to the complexity. Stations of the type SIMATIC S5 function in just the same way as representative objects. Merging Projects in the Multiproject: If you have used the multiproject functions allowing you to use connections to a partner in an unknown project, STEP 7 will automatically attempt to synchronize two separately configured connections.
  • Page 43 1 Communication via Ethernet CPs in S7 Stations 1.7.5 Network/Project Variant: Several Subnets in Several (Sub) Projects Configuration of the System If several network types need to be used and if these need to be managed in different projects due to the different tasks of the stations or due to the large span of the plant, stations can be created as follows: S Using (sub) projects in the “multiproject”...
  • Page 44 1 Communication via Ethernet CPs in S7 Stations Organization in a Multiproject If you use a multiproject organization, follow the steps below to connect the S7-400/1 station to the PROFIBUS (1) subnet: Create a subnet of the type PROFIBUS in both subprojects and merge these two subnets in NetPro.
  • Page 45 1 Communication via Ethernet CPs in S7 Stations 1.7.6 Network/Project Variant: Connections between Subnets (TCP/IP) Configuration of the System If connections are required to stations on network structures connected by routers due to the differing tasks of the stations or the large span of the network, the stations in the other project can be reached by configuring “Other Stations”.
  • Page 46 2 Characteristics of the Ethernet CPs Communications Processors for S7-300 The modules are designed to match the components of the S7-300/C7-300 programmable logic controller and have the following features: S Compact modules (single or double width) for simple installation on the S7 standard rail S Can be used in central or expansion racks S The operator controls and displays are all located on the front panel...
  • Page 47 2 Characteristics of the Ethernet CPs Communications Processors for S7-400 The modules are designed to match the components of the S7-400 / S7-400H programmable logic controller and have the following features: S Single-width modules for simple installation in the S7-400 / S7-400H rack S Can be used in central or expansion racks S The operator controls and displays are all located on the front panel S No fan necessary...
  • Page 48 2 Characteristics of the Ethernet CPs Attachment Variants Below, you will see several typical possible attachments. For further information on attachment options and Ethernet structures, refer to the Ethernet network manual /9/. For ordering data and information on further components, please refer to the IK PI catalog. 2.3.1 Electrical Attachment The CP can be attached to Industrial Ethernet as follows:...
  • Page 49 2 Characteristics of the Ethernet CPs S Industrial Twisted Pair attachment, for example, using an OSM e.g. Optical Switch Module (OSM) ITP installation cable Figure 2-4 If the Industrial Ethernet twisted pair installation cable is used as shown in Figure 2-4, the CP automatically detects the medium and switches over to twisted pair.
  • Page 50 2 Characteristics of the Ethernet CPs S CP with integrated switch - twisted-pair attachment to RJ-45 female connector To set up small local area networks or to connect several Ethernet devices a 4-port switch was integrated in the CP 443-1 Advanced and a 2-port switch in the CP 343-1 and CP 343-1 Lean.
  • Page 51 2 Characteristics of the Ethernet CPs S Twisted pair attachment using RJ-45 jack In areas with little EMI such as in offices and wiring closets, the CP can be attached to Ethernet using twisted pair and the RJ-45 jack. e.g. Optical Switch Module (OSM) Figure 2-6 2.3.2...
  • Page 52 2 Characteristics of the Ethernet CPs Further Information You can order additional components from the SIMATIC NET range of cables according to the information in the IK PI catalog. Note Please note, that problem-free operation is possible only when either the AUI/ITP plug or the TP plug is inserted.
  • Page 53 2 Characteristics of the Ethernet CPs Slot Rules for SIMATIC S7-300 2.4.1 Permissible Slots In the SIMATIC S7-300, there is no set slot assignment for the SIMATIC NET CPs. Slots 4 to 11 are permissible (1, 2 and 3 cannot be used for CPs). The SIMATIC NET CPs can be installed both in the central rack and in an expansion rack, linked to the central rack via an IM 360/IM 361 (K-bus connection).
  • Page 54: Removing / Inserting (Replacing Modules

    2 Characteristics of the Ethernet CPs 2.4.4 Removing / Inserting (Replacing Modules) Note Removing and inserting the SIMATIC NET CPs for the SIMATIC S7-300 while the power is on is not permitted. You should also remember that by removing a module from the rack, all modules on the other side of it will be disconnected from the CPU.
  • Page 55 2 Characteristics of the Ethernet CPs Slot Rules for SIMATIC S7-400 2.5.1 Permissible Slots An S7-400 CP can be inserted both in the central rack and in the expansion rack with a K bus interface. For the total number of CPs you can install, please refer to the information on the relevant CP in the “Properties”...
  • Page 56: Note On The S7-400 Cpu: Connection Resources

    2 Characteristics of the Ethernet CPs 2.5.4 Removing / Inserting (Replacing Modules) Removing and inserting the SIMATIC NET CPs for the S7-400 while the power is on is possible without damaging the modules. If a CP is replaced with a new CP with the same order number, the configuration data simply needs to be downloaded again if it is not stored on the CPU (see also CP-specific sections of this manual).
  • Page 57: Operating The Ethernet Cp With

    3 Operating the Ethernet CP with STEP 7/NCM S7 To attach a SIMATIC station to Industrial Ethernet via the Ethernet CP, configure the CP with the NCM S7 configuration software. The chapter explains the following: S How the CP is configured in the STEP 7 project S How the various network configurations are managed (setting up access to other systems) S How to control and supply the CP with data using NCM S7...
  • Page 58: How To Commission An Ethernet Cp

    3 Operating the Ethernet CP with How to Commission an Ethernet CP The essential steps in commissioning an Ethernet CP are shown in the following overview: Notice The chart below shows the basic steps. Please read the device-specific instructions in “Installation and Commissioning” in the description of your CP (Manual Part B).
  • Page 59: General Information On Step 7 / Ncm S7

    3 Operating the Ethernet CP with General Information on STEP 7 / NCM S7 Installation The functions of NCM S7 are available automatically immediately after installing STEP 7. Functions NCM S7 consists of the following: S CP-specific index dialogs that you call using the properties dialog box of the modules.
  • Page 60: Configuring - Follow The Steps Below

    3 Operating the Ethernet CP with Configuring - Follow the Steps Below A CP is managed in an S7 project just as the other modules. You use STEP 7 to configure the hardware and create and manage the user software (see /6/). Configuring a CP involves the following steps (the broken lines indicate options): Create the Industrial Ethernet subnet (see 3.3.1) Check or set the network properties...
  • Page 61: Creating An Industrial Ethernet Subnet

    3 Operating the Ethernet CP with 3.3.1 Creating an Industrial Ethernet Subnet Aims To be able to attach the SIMATIC stations to a subnet, you create the subnet in your project. This means that all the parameters for the entire subnet are managed centrally.
  • Page 62 3 Operating the Ethernet CP with 3. If you prefer a NetPro graphic network display, select the network object “Ethernet” and confirm with Edit Open Object. " Figure 3-2 Graphic Network Representation (here showing stations not yet networked) From this graphic representation, you can also activate all the functions for networking and configuring connections with the Ethernet CPs.
  • Page 63 3 Operating the Ethernet CP with Notice Preserving Consistency in Merged Subnets After merging the subnets, you should check the consistency throughout the multiproject using the menu command Network > Check Interproject Consistency in NetPro to make sure that there is consistency throughout the multiproject. This check detects, for example, S7 subnet IDs that are not unique within the multiproject.
  • Page 64: Entering An Ethernet Cp In The Hardware Configuration

    3 Operating the Ethernet CP with 3.3.2 Entering an Ethernet CP in the Hardware Configuration Procedure By installing and assigning the Ethernet CP in the rack of a SIMATIC station, you establish the logical attachment between the Internet CP and the subnet. 1.
  • Page 65 3 Operating the Ethernet CP with Note You can open the dialog for setting the interface at any time from the Properties dialog of the CP in the “General” tab. 1. If you have not yet created a subnet in the project or have not yet created the selected subnet, you can now create a subnet.
  • Page 66 3 Operating the Ethernet CP with Note The “IP address” and “Subnet mask” input fields have no significance for ISO transport (option “IP protocol being used”). 3. Select the required subnet type in the “Subnet” list box. 4. You can display the properties dialog box for the selected subnet by clicking the Properties button.
  • Page 67: Displaying The Network Attachments Of A Station

    3 Operating the Ethernet CP with 3.3.3 Displaying the Network Attachments of a Station Procedure You can easily get an overview of the network attachment configurations of a SIMATIC station in one of the following ways: S A graphic overview in NetPro; S An overview in table form in the Properties dialog of the station Graphic Overview in NetPro The NetPro view provides you with a good overview of the networked stations:...
  • Page 68 3 Operating the Ethernet CP with Overview in Table Form The table view in the Properties dialog of the station provides a detailed overview of the components used for network attachment. Follow the steps below: 1. Using the SIMATIC Manager, select the station in your project that you want to check.
  • Page 69: Setting Further Cp Properties

    3 Operating the Ethernet CP with 3.3.4 Setting Further CP Properties Overview In addition to the network attachment, you can also make further settings for the specific module or you can call functions. 1. Select the Ethernet CP in the hardware configuration. 2.
  • Page 70 3 Operating the Ethernet CP with Please read the description of the Properties dialog of the CP in the integrated help. The functions are explained in detail there. Addresses Tab The Addresses tab displays the address at which the module can be addressed by the user program.
  • Page 71 3 Operating the Ethernet CP with Table 3-1 Settings in the “Options” Tab , continued Option Meaning / Effect Replace module without PG With this option, you can have the configuration data of the CP stored on the CPU. If you then replace CP, the configuration data for the new CP are downloaded automatically from the CPU when the CP is started up.
  • Page 72 3 Operating the Ethernet CP with Table 3-1 Settings in the “Options” Tab , continued Option Meaning / Effect Send keepalives for Here, you can set the interval at which keepalives are sent to the connections partner of a communications connection. This setting decides the latest time after which the failure of a communications partner is detected.
  • Page 73 3 Operating the Ethernet CP with Time-of-day Synchronization Tab In this tab, you can make the settings for one of the two synchronization modes explained below: S SIMATIC mode If the CP receives MMS time-of-day frames, its local time is synchronized providing the NTP mode was not configured (MMS = Manufacturing Message Specification).
  • Page 74 3 Operating the Ethernet CP with IP Access Protection Tab Using IP access protection gives you the opportunity of restricting communication over the CP of the local S7 station to partners with specific IP addresses. Partners V 5.2.1 you have not authorized cannot access data of the S7 station over the CP using the IP protocol (S7 connections).
  • Page 75 3 Operating the Ethernet CP with IP Configuration Tab In this tab, you can decide the route and the method with which the IP address of the local S7 station is obtained and assigned. V 5.2.1 With the options available here, it is also possible to assign IP addresses dynamically outside the STEP 7 configuration.
  • Page 76 3 Operating the Ethernet CP with Note You can query the IP address actually being used with NCM S7 Diagnostics. “Port Parameters” Tab Here, you can, when necessary, make fixed network settings for the transmission properties of every available port. As default, “Automatic Setting” is selected and this setting generally guarantees problem-free communication in most situations.
  • Page 77 3 Operating the Ethernet CP with “FTP” tab In this dialog, you can create / modify a file allocation table. With the information in the file allocation table, it is possible to address data blocks in one or more CPUs (up to 4) in an S7 station. Ethernet CP as FTP server for S7 CPU data To transfer data with FTP, create data blocks in the CPU of your S7 station;...
  • Page 78 3 Operating the Ethernet CP with Table 3-3 Options / Input Areas in the “PROFINET” Tab Option / Input Area Meaning / Effect Mode Depending on the type of CP device, you can select the possible modes here in which the S7 station can be operated on PROFINET. PROFINET IO Controller With this option you decide whether or not the Ethernet CP is operated as a PROFINET IO controller.You can also make this...
  • Page 79: Substitute Objects" In The Step 7 Project

    3 Operating the Ethernet CP with 3.3.5 “Substitute Objects” in the STEP 7 Project Overview Communication connections can be configured fully when the communications partners are available in the current project. For the stations on the Ethernet subnet, whose configuration data were not created in STEP 7 or whose configuration data are not managed in the currently active project, the following substitute objects can be created in the project: S SIMATIC S5 stations...
  • Page 80 3 Operating the Ethernet CP with Procedure To enter a substitute object in the project, following the steps below: 1. Select the project in the SIMATIC Manager. 2. Select Insert Station and then as necessary " " Other Station, PG/PC or SIMATIC S5 Possible result: the selected object is created in the project.
  • Page 81 3 Operating the Ethernet CP with Figure 3-6 Selecting the Subnet Type for “Other Station” (Example) 3. Select a subnet. Result: The “Properties - Ethernet Interface” dialog is displayed. Here, you can select the subnet, connect the station to the network and set the address (MAC, IP).
  • Page 82: Configuring Communication Services

    3 Operating the Ethernet CP with 3.3.6 Configuring Communication Services Setting Up Connections You must set up connections for the connection-oriented services supported by the Industrial Ethernet CP, see also the Table in Section 1.2. S S7 connections see the STEP 7 user manual /6/ S ISO transport connections see Section 5.4 S ISO-on-TCP connections...
  • Page 83: Assigning Addresses For The First Time (Applies To Latest Cps

    3 Operating the Ethernet CP with Assigning Addresses for the First Time (Applies to Latest CPs) Meaning of the Address Assignment - MAC Address and IP Address The CP ships with a factory-set MAC address. Without further configuration, the device can only be accessed over the Ethernet port using this MAC address. In its original state, you can already use the following functions via the CP using the ISO protocol and the factory-set MAC address: S Download the defined configuration to the CP or CPU...
  • Page 84: Addressing By Selecting The Target System In The Simatic Manager

    3 Operating the Ethernet CP with Requirements Before you can use the addressing described here, the CP must be obtainable online, which means: S An attachment to the Ethernet LAN must already exist; there must be no routers between subnets in the path. S The Ethernet port of your PG/PC must be accessible to STEP 7.
  • Page 85 3 Operating the Ethernet CP with Alternative Procedure You can also follow the steps outlined below in the SIMATIC Manager: 1. Use the menu command PLC Display Accessible Nodes to display the " nodes that you can access over Industrial Ethernet. 2.
  • Page 86: Addressing Using The Properties Dialog In Hw Config Or Netpro

    3 Operating the Ethernet CP with 3.4.2 Addressing using the Properties Dialog in HW Config or NetPro Follow the steps below to assign the IP address the first time: 1. Open the SIMATIC Manager. 2. Define the configuration of your S7 station with the appropriate components in HW Config in an existing or newly created project.
  • Page 87: Downloading The Configuration Data To The Target System

    3 Operating the Ethernet CP with Downloading the Configuration Data to the Target System Principle The configuration data of the Ethernet CP are downloaded from the hardware configuration. All the configuration data of the S7 station are downloaded including the central configuration, all relevant DP master systems and all parameter settings.
  • Page 88 3 Operating the Ethernet CP with Procedure To download the configuration data to the S7 station, follow the steps outlined below: 1. Open the “Set PG/PC Interface” dialog box in the Windows Control Panel. 2. Set the PG/PC interface according to the CPs available on your PG and according to the bus attachment (interface parameter assignment used).
  • Page 89 3 Operating the Ethernet CP with Relocating the CP in the Hardware Configuration If you are using communication services with configured connections, the connection IDs also identify the slot of the CP. If you “drag” a CP you have already configured to a different slot, note the following: Notice If you drag the CP to a different slot, the data of the connection configuration are...
  • Page 90: Send/Receive Interface In The User Program

    Appendix C “Support and Training”. The Quick Start CD that can be ordered separately is a treasure-trove of sample programs and configurations. You can order this directly over the Internet at: http://www4.ad.siemens.de/WW/news/e n/21827955 S7-CPs for Industrial Ethernet Configuring and Commissioning A-90 Release 01/2007...
  • Page 91: How The Send/Receive Interface Works On The Cpu

    4 SEND/RECEIVE Interface in the User Program How the SEND/RECEIVE Interface Works on the CPU Functions (FCs) The following functions (FCs) are available for handling communication on connections: S AG_SEND/AG_LSEND This block takes the user data from the specified user data area and transfers it to the Ethernet CP.
  • Page 92: Programming The Send/Receive Interface

    4 SEND/RECEIVE Interface in the User Program Programming the SEND/RECEIVE Interface Principle of Job and Data Transfer The user program triggers the transfer of the user data areas with FC calls and monitors the transfer by evaluating the return codes of the FCs. The following parameters are transferred when the FCs are called: S The number of the connection (ID) S The location of the user data area in the CPU...
  • Page 93 4 SEND/RECEIVE Interface in the User Program Calling FCs in the CPU Program One possible sequence for FCs in conjunction with the organization and program blocks in the CPU cycle is illustrated in the following diagram. Read in the received Read PII data of the connection...
  • Page 94 4 SEND/RECEIVE Interface in the User Program S At various points (event and program-controlled) the user program sends data on a connection using the AG_SEND call. S At various points in the CPU cycle, the user program accepts the data received on the connection using an AG_RECV call.
  • Page 95: Data Exchange S7 Cpu <-> Ethernet Cp

    4 SEND/RECEIVE Interface in the User Program Data Exchange S7 CPU <-> Ethernet CP The Ethernet CP processes the send and receive jobs independent of the CPU cycle and requires one transmission time. The interface to the user program with the FCs is synchronized by an acknowledgment.
  • Page 96 4 SEND/RECEIVE Interface in the User Program FC Calls Slower than the Transmission Time If a block is called again before the data were completely transferred or received, the procedure is as follows on the interface of the FC blocks: S AG_SEND/AG_LSEND: The job is positively acknowledged.
  • Page 97: Additional Information

    4 SEND/RECEIVE Interface in the User Program Additional Information 4.4.1 Programming Data Transfer on TCP Connections Purpose of TCP Connections TCP connections should be used above all for connections to systems of a different type if they do not support RFC1006. For communication between devices of the SIMATIC family, you should use the more convenient ISO-on-TCP connections! The following sections explain certain special points to note.
  • Page 98: Recommendations For Use With A High Communications Load

    4 SEND/RECEIVE Interface in the User Program 4.4.2 Recommendations for Use with a High Communications Load Overview The points below will help you to avoid overload situations on your CPU when using the Ethernet CPs. In particular when you replace an older CP with a newer CP and are then confronted with overload problems, you should check your application for the pitfalls outlined below.
  • Page 99 5 Configuring Communication Connections This chapter explains the following: S The general aspects of configuring communication connections S How to configure ISO transport, ISO-on-TCP, UDP and TCP connections S How to use the connection configuration functions to specify communication partners that exchange data via UDP You will find a description of the connection-specific properties dialogs in the following sections: S ISO transport connections see Section 5.4...
  • Page 100: Configuring Communication Connections

    5 Configuring Communication Connections Procedure Initial Situation The steps described here assume the following: 1. You have created the local S7 station and the required partner stations in your STEP 7 projects (refer to the description in Chapter 3). 2. You have clarified the other station types with which connections must be established.
  • Page 101: Possible Connection Configurations

    5 Configuring Communication Connections Possible Connection Configurations Communication connections are possible between the communication partners shown in the diagram below. The communication partners can be in the same project or distributed in the subprojects of a multiproject. Connections to communication partners outside a project are configured using the STEP 7 object “Partner other project”...
  • Page 102 5 Configuring Communication Connections Organization in a Multiproject If interproject subnets are configured, you can also configure connections over such subnets using STEP 7 V5.2. The endpoints of these connections can be located in different projects. STEP 7 supports you both when creating interproject connections within a multiproject as well as when synchronizing connections that were configured without a multiproject context.
  • Page 103: Connections

    5 Configuring Communication Connections Connections Characteristics of a Connection A communication connection allows program-controlled communication between two nodes on Industrial Ethernet with the following characteristics: S The data transfer is bi-directional, in other words, it is possible to transmit and receive on the connection simultaneously.
  • Page 104 5 Configuring Communication Connections Note The term “connection” is also used here for UDP. Reason: During configuration (just as in TCP) the communication partners are assigned to each other and therefore logically “connected”. In actual fact, with UDP there is no explicit connection establishment between communication partners.
  • Page 105 5 Configuring Communication Connections Tasks of the Ethernet CP When handling the data transfer on a connection, the Ethernet CP has the following tasks: S When receiving Receiving data from Ethernet and transferring it to the user data area on the CPU.
  • Page 106: New Connection

    5 Configuring Communication Connections 5.3.1 New Connection Principle When you create new connections, you start from entered and networked stations. A connection is then configured starting from a station or CPU in the current S7 project and then selecting a destination station. Due to the networking, the node addresses (MAC or IP addresses) of the two stations are already decided.
  • Page 107 5 Configuring Communication Connections Figure 5-3 Layout of the “New Connection” Dialog (Example of an ISO Transport Connection) 3. Select the partner station to which you want to establish a connection (if several CPUs exist, please select the required CPU). 4.
  • Page 108: Connections To Partners In Other Projects

    5 Configuring Communication Connections Handling Connections in a Multiproject Interproject connections to a specified partner (for example, a CPU) are created in the same way as connections within a project (identical procedure). The dialog for selecting the connection partner has been extended and allows you not only to select the endpoint (module) but also the project within a multiproject to which the endpoint belongs.
  • Page 109 5 Configuring Communication Connections In both projects, the same connection name must be configured in the properties of the connection. The connection name is used as a textual reference when the projects are merged. Based on the connection name it is possible to assign the connection partner and synchronize the connection properties.
  • Page 110 5 Configuring Communication Connections The following table lists the possible options. Table 5-2 Meaning for Connection IP Address / TSAP / Port Possible Connection Establishment MAC Address Establishment by any partner empty empty passive by any partner via specific TSAP empty specified passive...
  • Page 111: Further Functions

    5 Configuring Communication Connections 5.3.3 Further Functions Toolbar In the toolbar of the connection configuration dialog the following functions are available: Save To save the configured connection, select the Save function or click the save button. Print You can print the entire connection table or individual sections of it by selecting the Print function or clicking the print button.
  • Page 112: Connections Without Assignment

    5 Configuring Communication Connections 5.3.4 Connections Without Assignment Overview This section explains the actions that can lead to a configured connection losing its assignment to the CP or being deleted. Caution Remember that in contrast to the S7 connections, the connections of the SEND/RECEIVE interface are assigned a CP-dependent ID.
  • Page 113 5 Configuring Communication Connections Table 5-3 Actions That Can Cause Changes to Configured Connections, continued Action Consequences for the How to Establish the Connection Connections Again Deleting the SIMATIC S7 All the connections to this station Reconfigure the station and station.
  • Page 114 5 Configuring Communication Connections Display (Example) The status of connections is displayed in the “Properties ISO Transport Connection” dialog in the “Overview” tab. Figure 5-4 Status of the Connections in the “Overview” Tab (Example of ISO Transport Connections) S7-CPs for Industrial Ethernet Configuring and Commissioning A -114 Release 01/2007 C79000-G8976-C182-07...
  • Page 115: Configuring Iso Transport Connections

    5 Configuring Communication Connections Configuring ISO Transport Connections Introduction When you create a connection in the New dialog, you specify the connection type and, as far as possible, the connection partner. When necessary, you can adapt other connection partners that are set as default when you create a new connection as described below.
  • Page 116: Specifying The Local Connection Endpoint

    5 Configuring Communication Connections 5.4.1 Specifying the Local Connection Endpoint General Tab This tab of the Properties dialog displays general connection parameters that identify the local connection endpoint. Figure 5-5 Layout of the Properties Dialog for the “General” Tab (ISO Transport Connections) S7-CPs for Industrial Ethernet Configuring and Commissioning A -116 Release 01/2007...
  • Page 117 5 Configuring Communication Connections Attributes Description Access Local Endpoint The entry is identical to the Local ID parameter in the connection Selectable table. Name When you create the connection, a name is proposed here for the Modifiable connection endpoint along with a connection number as suffix. With unspecified connections, use this box to identify the partner.
  • Page 118: Specifying Iso Transport Addresses

    5 Configuring Communication Connections 5.4.2 Specifying ISO Transport Addresses Address Parameters An ISO transport connection is specified by the local and remote connection endpoint. S Local addresses: Local MAC address and local TSAP (Transport Service Access Point) S Remote addresses: Remote MAC address and remote TSAP Ethernet station A Ethernet station B...
  • Page 119 5 Configuring Communication Connections Addresses Tab The addresses tab displays proposed values for the relevant local and remote address information. When connecting to non-S7 stations, you can set the TSAP addresses individually. Figure 5-7 Layout of the “Addresses” Tab of the Properties Dialog with Default TSAPs TSAP Format ISO transport connections have a TSAP length of 1 to 16 bytes.
  • Page 120 5 Configuring Communication Connections Default TSAPs When configuring the local and remote TSAPs, there is a default value “ISO-1” for the first connection between the two partners (can be changed). For a new connection between the two partners, the default value “ISO-2” is proposed. With a new connection to a new partner, the value ISO-1 is used again.
  • Page 121: Specifying Iso Transport Dynamic Properties

    5 Configuring Communication Connections 5.4.3 Specifying ISO Transport Dynamic Properties Dynamics Tab The Dynamics tab displays the relevant timers and counters of this connection. You can normally accept these default values. If necessary, for example with connections to non-Simatic systems, you can set the timers and counters individually and influence the dynamic response of the connection.
  • Page 122 5 Configuring Communication Connections Attributes Description Access Max. CMax. Count is the Modifiable number of attempted transmissions including the first (1-100, default 5).ount Inactivity Time The inactivity time specifies the interval after which the Modifiable connection is terminated if no sign of life is received from the partner (6 -180 s, default 30 s).
  • Page 123: Checking Iso Transport Connection Properties

    5 Configuring Communication Connections 5.4.4 Checking ISO Transport Connection Properties Overview Tab The Overview tab displays all previously configured ISO transport connections and their parameters for this station (information only). For an example of this display, refer to Section 5.3.4. Parameter Description Local ID...
  • Page 124: Configuring Iso-On-Tcp Connections Properties

    5 Configuring Communication Connections Configuring ISO-on-TCP Connections Properties Introduction When you create a connection in the New dialog, you specify the connection type and, as far as possible, the connection partner. When necessary, you can adapt other connection partners that are set as default when you create a new connection as described below.
  • Page 125: Specifying The Local Connection Endpoint

    5 Configuring Communication Connections 5.5.1 Specifying the Local Connection Endpoint General Tab This tab of the Properties dialog displays general connection parameters that identify the local connection endpoint. Figure 5-10 Layout of the “General” Tab in the Properties Dialog for ISO-on-TCP Connections S7-CPs for Industrial Ethernet Configuring and Commissioning A -125 Release 01/2007...
  • Page 126 5 Configuring Communication Connections Parameter Description Access Local Endpoint The entry is identical to the Local ID parameter in the Selectable connection table. Name When you create the connection, a name is proposed here Modifiable along with a connection number as suffix. With unspecified connections, use this box to identify the partner.
  • Page 127: Specifying Iso-On-Tcp Addresses

    5 Configuring Communication Connections 5.5.2 Specifying ISO-on-TCP Addresses Address Parameters A connection is specified by the local and remote connection endpoint. S Local addresses: Local IP address and local TSAP (Transport Service Access Point) S Remote addresses: Remote IP address and remote TSAP Ethernet station A Ethernet station B Local...
  • Page 128 5 Configuring Communication Connections Addresses Tab The addresses tab displays proposed values for the relevant local and remote address information. If necessary, you can set the TSAP addresses individually. Figure 5-12 Layout of the “Addresses” Tab of the Properties Dialog with Default TSAPs for ISO-on-TCP Connections TSAP Format ISO-on-TCP connections have a TSAP length of 1 to 16 bytes.
  • Page 129 5 Configuring Communication Connections Default TSAPs When configuring the local and remote TSAPs, there is a default value “TCP-1” for the first connection between the two partners (can be changed). For a new connection between the two partners, the default value “TCP-2” is proposed. With a new connection to a new partner, the value TCP-1 is used again.
  • Page 130: Checking Iso-On-Tcp Connection Properties

    5 Configuring Communication Connections 5.5.3 Checking ISO-on-TCP Connection Properties Overview Tab The overview shows all the configured ISO-on-TCP connections and their parameters (cannot be modified here). You can adjust the width of the columns in the table. For an example of this display, refer to Section 5.3.4 (the ISO transport connection).
  • Page 131: Configuring Tcp Connection Properties

    5 Configuring Communication Connections Configuring TCP Connection Properties Introduction When you create a connection in the New dialog, you specify the connection type and, as far as possible, the connection partner. When necessary, you can adapt other connection partners that are set as default when you create a new connection as described below.
  • Page 132: Specifying The Local Connection Endpoint

    5 Configuring Communication Connections 5.6.1 Specifying the Local Connection Endpoint General Tab This tab of the Properties dialog displays general connection parameters that identify the local connection endpoint. Figure 5-14 Layout of the “General” Tab in the Properties Dialog for TCP Connections S7-CPs for Industrial Ethernet Configuring and Commissioning A -132 Release 01/2007...
  • Page 133 5 Configuring Communication Connections Attributes Description Access Local Endpoint The entry is identical to the Local ID parameter in the Selectable connection table. Name When you create the connection, a name is proposed here Modifiable along with a connection number as suffix. With unspecified connections, use this box to identify the partner.
  • Page 134: Specifying Tcp Addresses

    5 Configuring Communication Connections Connection Name (Reference) - Only in Multiproject If you create a connection to a partner in another project, that has not yet been merged with the current multiproject, you must enter a connection name as reference. Interproject connections can then be joined up based on this reference. As soon as the connections have been brought together, the connection name (reference) can no longer be entered.
  • Page 135 5 Configuring Communication Connections Addresses Tab - Specified TCP Connection The addresses tab displays proposed values for the relevant local and remote address information. You can change the port settings individually. Figure 5-16 Layout of the Properties Dialog in the “Addresses” tab with DEFAULT Ports for TCP Connections Ports The ports or port addresses define the access point to the user program within the...
  • Page 136 5 Configuring Communication Connections Table 5-4 , Fortsetzung Application / Note Port Addresses Range used by NCM in which a free port address is from 2000 to 5000 searched for and assigned. You can set any port address within this range. Port addresses higher than 5000 are used by the system! from 5000...65535 Note:...
  • Page 137 5 Configuring Communication Connections Addresses Tab - Unspecified TCP Connection If you select the partner type as “unspecified”, depending on your task, you can enter address information about the communication partner here. The options available to you are explained in detail in Section 5.3.1. The Addresses tab shown here illustrates the situation in which the remote port but not the IP address was specified.
  • Page 138: Checking Tcp Connection Properties

    5 Configuring Communication Connections 5.6.3 Checking TCP Connection Properties Overview Tab The overview shows all the previously configured TCP connections and their parameters (cannot be modified here). You can adjust the width of the columns in the table. For an example of this display, refer to Section 5.3.4 (the ISO transport connection).
  • Page 139: Configuring Udp Connection Properties

    5 Configuring Communication Connections Configuring UDP Connection Properties Introduction When you create a connection in the New dialog, you specify the connection type and, as far as possible, the connection partner. When necessary, you can adapt other connection partners that are set as default when you create a new connection as described below.
  • Page 140: Specifying The Local Connection Endpoint

    5 Configuring Communication Connections 5.7.1 Specifying the Local Connection Endpoint General Tab This tab of the Properties dialog displays general connection parameters that identify the local connection endpoint. Figure 5-18 Layout of the “General” Tab in the Properties Dialog for UDP Connections S7-CPs for Industrial Ethernet Configuring and Commissioning A -140 Release 01/2007...
  • Page 141 5 Configuring Communication Connections Attributes Description Access Local Endpoint The entry is identical to the Local ID parameter in the Selectable connection table. Name When you create the connection, a name is proposed here Modifiable along with a connection number as suffix. With unspecified connections, use this box to identify the partner.
  • Page 142: Specifying Udp Addresses

    5 Configuring Communication Connections 5.7.2 Specifying UDP Addresses Address Parameters and Connection Types With UDP, the communication partners are addressed using the local and remote endpoint, as follows. S Local addresses: Local IP address and local port S Remote addresses: Remote IP address and remote port Note The term “connection”...
  • Page 143 5 Configuring Communication Connections Addresses Tab - Specified UDP Connections The addresses tab displays proposed values for the relevant local and remote address information. You can make the settings for the ports individually. Figure 5-20 Layout of the Properties Dialog in the “Addresses” tab with DEFAULT Ports for UDP Connections Ports The ports or port addresses define the access point to the user program within the...
  • Page 144 5 Configuring Communication Connections The following port numbers are reserved; you should not use these for other purposes in the connection project engineering. Table 5-7 Reserved Port Numbers Protocol Port Number Service 20, 21 SMTP HTTP RFC1006 RPC -DCOM SNMP_REQUEST 34964 PN IO 65532...
  • Page 145 5 Configuring Communication Connections Addresses Tab - Unspecified UDP Connection An unspecified UDP connection can be used in two ways: S Free UDP Connection To configure a free UDP connection, select the “Address assignment in block” check box. The input boxes for the remote IP address and the remote port are then deactivated since the destination addresses are now specified by the user program.
  • Page 146: Udp With Broadcast And Multicast

    5 Configuring Communication Connections 5.7.3 UDP with Broadcast and Multicast Application When you select the connection partner, you have the following two extra options on UDP connections: S Connection to all Broadcast Nodes If you select the “all broadcast nodes”, you specify that UDP frames are sent to all obtainable broadcast nodes.
  • Page 147 5 Configuring Communication Connections Why Does an S7-CP Prevent Reception on Broadcast Connections? It is often necessary for one station to send frames to a number of partner stations. It is important that the frames are sent at the same time and arrive and practically the same time.
  • Page 148 5 Configuring Communication Connections Addresses Tab - Connection to all Broadcast Nodes If you select “all broadcast nodes” as the connection partner, you specify that UDP frames are sent to all obtainable broadcast nodes. In the “Addresses” tab, a valid broadcast address in the network is proposed for the partner under the IP address (IP).
  • Page 149 5 Configuring Communication Connections Addresses Tab - Connection to all Multicast Nodes By selecting “all multicast nodes” as the connection partner, you specify that S sent UDP frames are delivered to all multicast nodes of the multicast group; S the local device receives multicast frames in the specified multicast group. The multicast group is specified using the IP address and the port addresses.
  • Page 150 5 Configuring Communication Connections Notice Within a multicast group, you should assign identical PORT addresses for the local port and the partner port. This is the only way that frames can be sent and also received by the CP within a multicast group! Note the following example of three nodes in the multicast group: Ethernet station A UDP connection...
  • Page 151 5 Configuring Communication Connections IP Addresses for IP Multicast S Possible Values IP addresses from 224.0.0.0 to 239.255.255.255 can be used for IP multicast. Since the IP addresses up to 224.0.0.255 are reserved for special purposes, we recommend that you use IP addresses starting at 224.0.1.0 (default) for IP multicast.
  • Page 152: Checking The Properties Of A Udp Connection

    5 Configuring Communication Connections 5.7.4 Checking the Properties of a UDP Connection Overview Tab At the overview level, all the configured UDP connections and their parameters in this station are displayed (cannot be modified). You can adjust the width of the columns in the table. For an example of this display, refer to Section 5.3.4 (the ISO transport connection).
  • Page 153: Free Udp Connection

    5 Configuring Communication Connections 5.7.5 Free UDP Connection Program-Controlled Addressing A free UDP connection allows program-controlled addressing of the communication partner. Communication between two nodes on Industrial Ethernet has the following properties: S Data transfer is bi-directional; in other words it is possible to send and receive on the UDP connection at the same time.
  • Page 154: Fetch/Write Mode

    5 Configuring Communication Connections FETCH/WRITE Mode FETCH/WRITE The FETCH/WRITE services allow direct access to the system memory areas on the SIMATIC S7 CPU from SIMATIC S5, SIMATIC PC stations, or from devices of other ranges. S FETCH: Read data directly S WRITE: Write data directly Connection Types The FETCH/WRITE services can be configured and used in SIMATIC S7 on the...
  • Page 155 5 Configuring Communication Connections Figure 5-25 Configuring FETCH PASSIVE Based on the Example of an ISO Transport Connection The connection can then only be used for this mode; sending or receiving with the FCs AG_SEND/AG_LSEND or AG_RECV/AG_LRECV is then no longer possible.
  • Page 156 5 Configuring Communication Connections “S7 Addressing Mode” Option When you configure the FETCH ACTIVE / WRITE ACTIVE modes, you can select the addressing mode. This specifies how the addresses will be interpreted in the FETCH/WRITE call in the SIMATIC S7 station when accessing DBs: S S7 addressing mode: byte address S S5 addressing mode: word address This makes it possible for applications to access S5 or S7 stations without needing...
  • Page 157 5 Configuring Communication Connections Messages in the Diagnostic Buffer As a result of FETCH/WRITE access, negative acknowledgments from the S7 CPU are possible. This then leads to corresponding connection-oriented entries in the diagnostic buffer that you can read out with NCM Diagnostics (see Section 8.5).
  • Page 158: Routing To Distribute Load

    5 Configuring Communication Connections Routing to Distribute Load Routing to Distribute Load If more than one CP of the same type exists in a station and is connected to the same subnet, the route can be selected Click the “Route” button in the “General” tab to display the route dialog: If you have configured a load distribution on two or more Ethernet CPs at the local or remote end, you can assign the connection to the required route via the CP.
  • Page 159 5 Configuring Communication Connections Parameter Description Via CP / Local If more than one Ethernet CP exists in the station via which connections operated you can select route here. The CPs are only displayed for selection if they are networked. If no CP is assigned (for example because the CP was deleted previously) “(None)”...
  • Page 160: Programmed Communication Connections

    6 Programmed Communication Connections 6 Programmed Communication Connections In some situations, it is an advantage to set up communication connections not over the configuration interface of STEP 7 but program-controlled by a specific V 5.2.1 application. Typical users who will find this useful are, for example, mass producers of machines who want to offer their customers a simple user interface but need to adapt the communication services to the operator input.
  • Page 161: Overview

    6 Programmed Communication Connections Overview Area of Application Communication connections can be freely configured controlled by the program. Interplay between Programming and Configuration Connections are either configured using STEP 7 or configured by the user program while the S7 station is running. Mixing these variants on a CP is not possible! Principle Configuration data for communication connections can be transferred to the CPU using the function block called in the user program.
  • Page 162 6 Programmed Communication Connections Note Read the description of FB55 IP_CONFIG in Section 7.6. Configuration Limits A maximum of 64 connections can be specified in FB55 CP_CONFIG. The most important factor, however, is the maximum number of connections supported by the CP type you are using (see /2/).
  • Page 163 6 Programmed Communication Connections Procedure Initial Situation The steps described here assume the following: 1. You have created the local S7 station and the required partner stations in your STEP 7 projects (refer to the description in Chapter 3). 2. You have clarified the other station types with which connections must be established.
  • Page 164 6 Programmed Communication Connections Configuration Data Block Meaning The configuration data block (CONF_DB) contains all the connection data and configuration data (IP address, subnet mask, default router, NTP time server and other parameters) for an Ethernet CP. The configuration data block is transferred to the CP with function block FB55.
  • Page 165 6 Programmed Communication Connections Example Below, you will find a sample of a configuration data block with the parameter field for system data and a parameter field for a TCP connection. Table 6-1 CONF_DB plana- tion DATA_BLOCK DB271 TITLE=IP_CONFIG for 1 active nTCP connection, AUTHOR : Alfred //CP data : IP=200.12.1.144, Router=200.12.1.80 FAMILY : AS300 //Connection data: Destination IP addr=200.12.1.99, NAME : ipconf //Local port = 4001, remote port = 5001, estab=active...
  • Page 166 6 Programmed Communication Connections The type definitions used in the sample DB follow. Table 6-2 Type Definitions for the System Data Subfield plana- tion // Data structures IP Config TYPE ”SUB_IP_V4” STRUCT id : int := 1; // ID for IP, V4-Addr. len: int := 8;...
  • Page 167 6 Programmed Communication Connections Table 6-3 Type Definitions for the Subfield TCP Connection plana- tion TYPE ”SUB_LOC_PORT” STRUCT id : int := 9; // ID_4_LOC_PORT len: int := 6; // Subfield length port: int := 2001; // Loc. Port END_STRUCT; END_TYPE TYPE ”SUB_REM_PORT”...
  • Page 168 6 Programmed Communication Connections Parameter Field for System Data (CP Networking) Meaning Below, you can see the subfields that are relevant for networking the CP. These must be specified in the parameter field for system data. Some applications do not require all the subfield types - refer to the table for details.
  • Page 169 6 Programmed Communication Connections Example Address Name Type Initial Value Comment STRUCT +0.0 DB_TYP WORD W#16#1 Identifier +2.0 FIELD_1 STRUCT // Field 1 (here system data field) +0.0 Type Type of data to be transferred 0 ... 5 +2.0 Connection ID (with system parameters 0) +4.0 Subfield_Cnt Number of subfields belonging to this field...
  • Page 170 6 Programmed Communication Connections Parameter Fields for Connection Types General Below, you will see which values need to be entered in the parameter fields and which subfields are used for the various connection types. Some applications do not require all the subfield types - refer once again to the table for details.
  • Page 171 6 Programmed Communication Connections 6.5.1 Parameter Field for TCP Connection Structure Identifier for the connection type Type = 1 ID = connection ID Freely assignable connection reference; must be specified in AG_SEND / AG_RECV. No_of_subfields = n Range of values for the connection ID: Subfield 1 S7-400: 1,2 through 64 Subfield 2...
  • Page 172 6 Programmed Communication Connections 6.5.2 Parameter Field for a UDP Connection Structure Type = 2 Identifier for the connection type ID = connection ID Freely assignable connection reference; No_of_subfields = n must be specified in AG_SEND / AG_RECV. Subfield 1 Range of values for the connection ID: Subfield 2 S7-400: 1,2 through 64...
  • Page 173 6 Programmed Communication Connections 6.5.3 Parameter Field for an ISO-on-TCP Connection Structure Type = 3 Identifier for the connection type ID = connection ID Freely assignable connection reference; No_of_subfields = n must be specified in AG_SEND / AG_RECV. Subfield 1 Range of values for the connection ID: Subfield 2 S7-400: 1,2 through 64...
  • Page 174 6 Programmed Communication Connections 6.5.4 Parameter Field for an E-Mail Connection Meaning To send E-mails, you must always set up one E-mail connection per IT-CP. The E-mail connection specifies the mail server, over which all the E-mails sent by the IT-CP are delivered.
  • Page 175 6 Programmed Communication Connections Table 6-8 , continued Subfield Parameter Type Special Features / Notes (Please refer also to the general ( mandatory description in Table 6-10 Page A -177) / optional) SUB_KBUS_ADR This value is always set to 0 for CPs for the m (for S7-300 and does not need to be specified.
  • Page 176 6 Programmed Communication Connections 6.5.5 Parameter field for FTP connection Meaning To handle an FTP job sequence between the S7 station as FTP client and an FTP server, the IT-CP must set up a connection to the S7-CPU. This connection is known in this context as an FTP connection.
  • Page 177 6 Programmed Communication Connections Subfield types Different parameters are required depending on the parameter field. Each parameter is described by a subfield. Which subfields are required is explained in the descriptions of the system data and the connection types in the previous sections.
  • Page 178 6 Programmed Communication Connections Table 6-10 , continued Subfield Subfield type Subfield length Meaning of the Parameter (in bytes) SUB_REM_TSAP TSAP length + 4 Remote TSAP SUB_EMAIL_SENDER Length of the E-mail address of the sender sender E-mail address + 4 SUB_DHCP_ENABLE 2 + 4 Obtain an IP address from a DHCP...
  • Page 179 6 Programmed Communication Connections Table 6-10 , continued Subfield Subfield type Subfield length Meaning of the Parameter (in bytes) SUB_ADDR_IN_DATABLOCK 1 + 4 Select free UDP connection. The remote node is entered in the job header of the job buffer by the user program when it calls AG_SEND.
  • Page 180 Appendix C “Support and Training”. The Quick Start CD that can be ordered separately is a treasure-trove of sample programs and configurations. You can order this directly on the Internet at: http://www4.ad.siemens.de/WW/news/en/574211 Entry ID: 574211 S7-CPs for Industrial Ethernet Configuring and Commissioning A -180...
  • Page 181 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs General Notes on FCs / FBs Block Library The functions (FCs) and function blocks (FBs) described here are supplied with the STEP 7 basic package unless indicated otherwise. The following list shows the numbers of the FCs as they are supplied with the configuration tool.
  • Page 182 You will find information on the current block versions and the current blocks to download from the Internet in our customer support. http://www4.ad.siemens.de/WW/news/en/8797900 With the older module types, this recommendation assumes that you are using the latest firmware for the particular block type.
  • Page 183 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Notice In some sections, this chapter contains information on various CP versions for S7-300. These sections are indicated by the following symbol: Newer CP types are CPs / module types with the following versions or higher: CP 343-1 Lean 6GK7 343-1CX10-0XE0 version 1 or higher / firmware version V1.0 or higher CP 343-1...
  • Page 184 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Notice Please remember that if you replace a module, you must only use the blocks permitted for the configured CP type in the user program. This means: If you replace the module without adapting the configuration data to the possibly newer module type, you do not need to make any changes to the blocks used.
  • Page 185 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Setting Parameters for FC Calls Before describing the FCs in detail, a few general comments on calling and setting parameters for FCs will be useful at this point. It is possible to make the following general statements about the following parameter groups that occur in all FCs: S Parameters for CP and connection assignment (input parameters) S Parameters for specifying a CPU data area (input parameters)
  • Page 186 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Setting Block Parameters Automatically To ensure correct parameter settings for the block calls, The LAD/STL/FBD editor in STEP 7 provides you with the option of accepting all the relevant parameters from the hardware configuration (HW Config) and from the connection configuration (NetPro).
  • Page 187 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs 7.2.3 Status Information (output parameters) For status evaluation, the following parameters must be evaluated in the user program: S DONE or NDR These parameters (DONE with send jobs and NDR with receive jobs) signal (successful) completion of the job.
  • Page 188 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FCs for the SEND/RECEIVE Interface Overview The following FCs are available for transferring data on the SEND/RECEIVE interface: Can be used with Meaning S7 - 300 S7 - 400 AG_SEND (FC5) for sending data AG_RECV (FC6) for receiving data...
  • Page 189 Please note that the following sample programs are also available on the Internet. S Sample program for the Send-Receive interface with the blocks FC5 (AG_SEND) and FC6 (AG_RECV) for S7-300: http://support.automation.siemens.com/WW/view/en/17853532 S Sample program for the Send-Receive interface with the blocks FC50 (AG_LSEND) and FC60 (AG_LRECV) for S7-400: http://support.automation.siemens.com/WW/view/en/18513371...
  • Page 190 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Specifying the Data Area on the CPU When you call an FC, you transfer the address and length of the data area in the CPU. Remember, that the maximum length of the data area depends on the block type and block version being used.
  • Page 191 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Working with the Job Header Free UDP connections require a job header in the user data area. The following schematic illustrates the structure of the job buffer and the meaning and location of the parameters in the job header.
  • Page 192 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Status display on the FC call interface; Special case with FC versions (only for S7 - 300) With the FCs AG_SEND (FC5) and AG_RECV (FC6), you will receive the codes shown below in the following situations: S CP is in STOP;...
  • Page 193 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs 7.3.1 FC5 AG_SEND / FC50 AG_LSEND Meaning of the Block The FCs AG_SEND / AG_LSEND pass data to the Ethernet CP for transfer over a configured connection. The selected data area can be a memory bit area or a data block area. Error-free execution of the function is indicated when the entire user data area could be sent over Ethernet.
  • Page 194 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC5 AG_SEND / FC50 AG_LSEND - continued Notice Please note the following special feature on TCP connections: With the older S7-CPs for S7-400, you must use FC AG_LSEND on TCP connections! With the latest S7-CPs for S7-300, you must also use FC AG_SEND for TCP connections.
  • Page 195 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC5 AG_SEND / FC50 AG_LSEND - continued S Case a: Sequence with older CP types The send job is executed as soon as the parameter ACT = 1 is passed. Following this, the parameter ACT = 0 must be passed in at least one further call.
  • Page 196 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC5 AG_SEND / FC50 AG_LSEND - continued S Case b: Sequence with newer CP types (S7-300 only!) The send job is started as soon as the parameter ACT = 1 is passed. In contrast to case a, the protocol used here to transfer the data segments (each 240 bytes of user data) requires the FC to be called again for each segment.
  • Page 197 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC5 AG_SEND / FC50 AG_LSEND - continued Note In principle, it is possible to call the FC more than once within the CPU cycle to speed up the handling of the job. Do not forget, however, that this increases the load during the CPU cycle (the load differs depending on the CPU type)! Explanation of the Formal Parameters The following table explains all the formal parameters for the AG_SEND...
  • Page 198 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC5 AG_SEND / FC50 AG_LSEND - continued Parameter Declaratio Type Possible Remarks Values INPUT On ISO Number of bytes to be sent from the data area Transport and with this job. The possible values range from 1 to length specified for the SEND parameter.
  • Page 199 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC5 AG_SEND / FC50 AG_LSEND - continued Note For entries coded with 8Fxx in STATUS, refer to the information in the STEP 7 Standard and System Functions reference manual. The chapter describing error evaluation with the RET_VAL output parameter contains detailed information.
  • Page 200 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC5 AG_SEND / FC50 AG_LSEND - continued Table 7-2 AG_SEND / AG_LSEND Codes DONE ERROR STATUS Meaning 8F44 Address of the parameter to be read is disabled in the accessed rack.
  • Page 201 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs 7.3.2 FC6 AG_RECV / FC60 AG_LRECV Meaning of the Block The AG_RECV / AG_LRECV function receives the data transferred on a configured connection from the Ethernet CP. The data area specified for the receive data can be a memory bit area or a data block area.
  • Page 202 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC6 AG_RECV / FC60 AG_LRECV - continued Notice Please note the following special feature on TCP connections: With the older S7-CPs for S7-300, you must use FC AG_LRECV on TCP connections! With the latest S7-CPs for S7-300, you must also use FC AG_RECV for TCP connections.
  • Page 203 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC6 AG_RECV / FC60 AG_LRECV - continued S Case a: Sequence with older CP types When the FC is called, the user program prepares the buffer for the received data and instructs the CP to enter the received data there. As soon as a data record has been entered fully and consistently in the receive buffer, this is indicated by the parameter NDR = 1 in one of the next FC calls.
  • Page 204 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC6 AG_RECV / FC60 AG_LRECV - continued S Case b: Sequence with newer CP types (S7-300 only!) When the FC is called, the user program prepares the buffer for the received data and instructs the CP to enter the received data there.
  • Page 205 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC6 AG_RECV / FC60 AG_LRECV - continued Explanation of the Formal Parameters The following table explains all the formal parameters for the AG_RECV / AG_LRECV function. Parameter Declaratio Type Possible Remarks Values INPUT...
  • Page 206 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC6 AG_RECV / FC60 AG_LRECV - continued Parameter Declaratio Type Possible Remarks Values OUTPUT On ISO Specifies the number of bytes accepted from Transport and the Ethernet CP and entered in the data area. ISO-on-TCP: Note the block type: 1,2...8192...
  • Page 207 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC6 AG_RECV / FC60 AG_LRECV - continued Table 7-3 AG_RECV / AG_LRECV Codes ERROR STATUS Meaning 8186 ID parameter invalid. ID != 1,2..16 (S7-300). ID != 1,2..64.(S7-400) 8304 The connection is not established. The send job should only be attempted again after waiting for at least 100 ms.
  • Page 208 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC6 AG_RECV / FC60 AG_LRECV - continued Table 7-3 AG_RECV / AG_LRECV Codes ERROR STATUS Meaning 80C4 Communication error (occurs temporarily and a repetition in the user program will often remedy the problem). 80D2 Module base address incorrect.
  • Page 209 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FCs for Access Coordination with FETCH/WRITE Overview The following FCs are available for FETCH/WRITE function to coordinate access: can be used with: Meaning S7 - 300 S7 - 400 AG_LOCK (FC7) Locks external data access with FETCH/WRITE.
  • Page 210 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs User program Ethernet CP Communications Partner (CPU cycle) AG_LOCK FETCH/WRITE Cycle n LOCKED = 0 access to DB x active AG_LOCK Cycle n+1 LOCKED = 0 AG_LOCK LOCKED = 1 FETCH/WRITE Cycle n+2 FETCH/WRITE rejected...
  • Page 211 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs 7.4.1 FC7 AG_LOCK Meaning of the Block Using the AG_LOCK block the data exchange using FETCH or WRITE on the connection selected with the parameter ID is disabled. The LOCKED output indicates whether or not the lock was successful.
  • Page 212 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC7 AG_LOCK - continued Parameter Declaratio Type Possible Remarks Values INPUT 1,2...16 for The connection number of the connection is specified in the parameter ID. (See S7-300 Configuration Section 5.3.1) 1,2...64 for S7-400 LADDR...
  • Page 213 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs 7.4.2 FC8 AG_UNLOCK Meaning of the Block Using the AG_UNLOCK function, the external access to system areas on the S7 CPU with FETCH or WRITE on the connection specified by the ID parameter is released.
  • Page 214 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC8 AG_UNLOCK - continued Parameter Declaratio Type Possible Remarks Values INPUT 1,2...16 for The connection number of the connection is specified in the parameter ID. (See S7-300 Configuration Section 5.3.1) 1,2...64 for S7-400 LADDR...
  • Page 215 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC 10 AG_CNTRL How It Works With the AG_CNTRL function, you can diagnose connections. When necessary, you can initialize connection establishment again using the FC. The following actions are possible by setting commands: S Reading out connection information Based on status information, you can decide whether or not it would be useful to reset all or individual connections of the CP.
  • Page 216 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC10 AG_CNTRL - continued How the Block Works The following diagram shows a typical sequence of AG_CNTRL jobs in the user program. User program Ethernet CP (CPU cycle) An event is detected that makes it useful to abort and reestablish a connection.
  • Page 217 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC10 AG_CNTRL - continued The reset ID (bit 15 in RESULT1) is set on the CP. If there is a status query later, it is therefore clearly recognizable whether the connection has been reset due to a reset job.
  • Page 218 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC10 AG_CNTRL - continued Paramete Declarati Type Possible Meaning / Remark Values ERROR OUTPUT BOOL 0: No error Error code 1: Error For the meaning of this parameter in conjunction with the DONE and STATUS parameters, refer to the following table 7-6.
  • Page 219 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC10 AG_CNTRL - continued Table 7-6 AG_CNTRL Codes DONE ERROR STATUS Meaning 8189 The CP version / firmware used does not support FC10. The code is set when you call a CP 3431 -EX20 with firmware as of V1.3.9;...
  • Page 220 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC10 AG_CNTRL - continued Commands and Evaluating the Job Results The following table shows you the possible commands and the results that can be evaluated in the RESULT1/2 parameters. Table 7-7 Commands to FC AG_CNTRL Meaning NOP –...
  • Page 221 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC10 AG_CNTRL - continued RESULT (for CMD = 1) Meaning Meaning Parameter Hex value/range Bit/valu RESULT1 0000 00*0 Bits 4 -7: Codes for the receive direction (excluded values: 0x2) Bit 4 Connection Type No send and receive connection Connection reserved for send and...
  • Page 222 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC10 AG_CNTRL - continued RESULT (for CMD = 1) Meaning Meaning Parameter Hex value/range Bit/valu RESULT1 0000 *000 Bits 12 -15: General CP information (excluded values: 0x3,0xB) Bit 12 + Information on connection status: (only available for SEND/RECV connections based on the ISO/RFC/TCP...
  • Page 223 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC10 AG_CNTRL - continued Meaning CN_RESET – connection reset This command resets the connection selected with ID. The CP is selected in the LADDR parameter. Resetting the connection means that a connection is aborted and established again (active or passive depending on the configuration).
  • Page 224 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC10 AG_CNTRL - continued Meaning CN_RESET_ALL – all connections reset: This command resets all connections. The ID parameter must be set to “0” (checked for 0). The CP is selected in the LADDR parameter. Resetting the connections means that connections are aborted and established again (active or passive depending on the configuration).
  • Page 225 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC10 AG_CNTRL - continued Meaning 6 and 7 CN_RESERVED_1 This job is reserved for firmware expansions; in contrast to the NOP job, this job is processed on the CP and leads to an appropriate code in the RESULT1/2 parameters. RESULT (for CMD = 6) Meaning Parameter...
  • Page 226 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FB55 IP_CONFIG for Programmed Communication Connections Meaning of the Block Connections can be specified in a DB (configuration DB) and transferred to the CP with an FB. You can use this variant of programmed communication connections as an alternative to connection configuration with STEP 7.
  • Page 227 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FB55 IP_CONFIG - continued How It Works The following diagram illustrates the normal sequence of connection configuration triggered by an IP_CONFIG in the user program. The job executes as soon as the parameter ACT is transferred with value 1. Due to the segmented transfer of the CONF_DB, you will need to repeat the job with ACT = 1 until completion of the job is indicated in the parameters DONE,...
  • Page 228 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FB55 IP_CONFIG - continued Explanation of the Formal Parameters The following table explains the formal parameters for the call interface of the IP_CONFIG function block : Parameter Declaratio Type Possible Remarks Values INPUT...
  • Page 229 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FB55 IP_CONFIG - continued Reserved Port Numbers The following local port numbers are reserved; you should not use these for other purposes in the connection project engineering. Table 7-8 Reserved Port Numbers Protocol Port number Service...
  • Page 230 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FB55 IP_CONFIG - continued Table 7-9 Condition Codes for FB55 IP_CONFIG, Fortsetzung DONE ERROR STATUS Meaning Errors detected in the evaluation of the FB in the CPU or on the interface between CPU and CP. 8183 The CP rejects the requested data record number.
  • Page 231 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FB55 IP_CONFIG - continued Table 7-9 Condition Codes for FB55 IP_CONFIG, Fortsetzung DONE ERROR STATUS Meaning 8B0A Data error The content of the subfield is not correct. 8B0B Structure error A subfield exists twice.
  • Page 232 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FB88 PN_InOut / FB90 PN_InOut_Fast blocks for PROFINET CBA How It Works The task of function block FB88 / FB90 is to transfer data from the interface DB to the CP and from the CP to the interface DB. The interface DB itself is the interface to the user program.
  • Page 233 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FB88 PN_InOut / FB90 PN_InOut_Fast - continued Note For more detailed information on handling the interface DB, refer to the SIMATIC iMap documentation /19/. Notice When you reload user program blocks, data consistency is only guaranteed if the CPU is first changed to STOP.
  • Page 234 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FB88 PN_InOut / FB90 PN_InOut_Fast - continued Parameter Declaration Type Remarks LADDR INPUT WORD Module base address When you configure the CP with STEP 7 HW Config, the module base address is displayed in the configuration table.
  • Page 235 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FB88 PN_InOut / FB90 PN_InOut_Fast - continued Table 7-10 Codes for PN_InOut (FB88) and PN_InOut_Fast (FB90), Fortsetzung DONE ERROR STATUS Meaning 8090 (S7-400 only) Parameter assignment error An incorrect module address was specified; the address points to an empty slot.
  • Page 236 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FB88 PN_InOut / FB90 PN_InOut_Fast - continued Table 7-10 Codes for PN_InOut (FB88) and PN_InOut_Fast (FB90), Fortsetzung DONE ERROR STATUS Meaning 80D1 (S7-300 only) Configuration error Possible Causes: The interface of the configured component does not match the one used in the program (outputs).
  • Page 237 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FB88 PN_InOut / FB90 PN_InOut_Fast - continued Status Codes during CP Startup With a complete restart or restart of the PROFINET CP (after activating a switch on the module), the output parameters of the block are reset as follows: S DONE = 0 S ERROR = 0 S STATUS = 8181...
  • Page 238 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FCs and FBs for PROFINET IO Overview The FCs listed below are available for transferring data cyclically on the PROFINET IO interface. The significance of the FCs differs depending on how you use the CP (as a PROFINET IO controller or PROFINET IO device) in an S7 station.
  • Page 239 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs 7.8.1 FC11 PNIO_SEND The PNIO_SEND FC is used to transfer data in the PROFINET IO controller or PROFINET IO device modes of the CP. S Operation as PROFINET IO controller The block transfers the process data (outputs) of a specified output area to the CP to be forwarded to PROFINET IO devices and as status display returns the IO consumer status (IOCS) of the outputs of the PROFINET IO devices.
  • Page 240 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC11 PNIO_SEND - continued Paramete Declarati Type Possible Remarks Values CPLADDR INPUT WORD Module base address SEND IN_OUT ANY (as The address of Specifies the address and length. VARTYP the data area Controller mode: E only points to one of...
  • Page 241 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC11 PNIO_SEND - continued Paramete Declarati Type Possible Remarks Values DONE OUTPUT BOOL 0: - This parameter indicates whether or not the job was completed without errors. 1: New data accepted ERROR OUTPUT...
  • Page 242 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC11 PNIO_SEND - continued Condition Codes The following table shows the condition codes formed by the DONE, ERROR and STATUS parameters that must be evaluated by the user program. Note For entries coded with 8Fxx in STATUS, refer to the information in the STEP 7 Standard and System Functions reference manual.
  • Page 243 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC11 PNIO_SEND - continued Table 7-11 Condition Codes PNIO_SEND, Fortsetzung DONE ERROR STATUS Meaning 8F31 Parameter is in the write-protected 2nd act. data block. 8F32 Parameter contains a DB number that is too high. 8F3A Destination area is not loaded (DB).
  • Page 244 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs 7.8.2 FC12 PNIO_RECV The PNIO_RECV FC is used to accept data in the PROFINET IO controller or PROFINET IO device CP modes. S Operation as PROFINET IO controller The block accepts the process data from PROFINET IO devices (inputs of the controller) and transfers the IO provider status (IOPS) from the PROFINET IO devices to the specified input areas.
  • Page 245 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC 12 PNIO_RECV - continued Explanation of the Formal Parameters The following table explains all the formal parameters for FC12: Paramete Declara Type Possible Remarks tion Values CPLADDR INPUT WORD Module base address RECV IN_OUT...
  • Page 246 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC 12 PNIO_RECV - continued Paramete Declara Type Possible Remarks tion Values OUTPUT BOOL 0: - This parameter indicates whether or not the job was completed without errors. 1: Data accepted ERROR OUTPUT BOOL 0: -...
  • Page 247 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC 12 PNIO_RECV - continued Condition Codes The following table shows the codes formed by the DONE, ERROR and STATUS parameters that must be evaluated by the user program. Note For entries coded with 8Fxx in STATUS, refer to the information in the STEP 7 Standard and System Functions reference manual.
  • Page 248 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs FC 12 PNIO_RECV - continued Table 7-12 Condition Codes PNIO_RECV, continued ERROR STATUS Meaning 8F31 Parameter is in the write-protected 2nd act. data block. 8F32 Parameter contains a DB number that is too high. 8F3A Destination area is not loaded (DB).
  • Page 249 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Relationship between Block Call and IO Data S Operation as PROFINET IO controller As a PROFINET IO controller, the CP does not monitor the cyclic calls of the PNIO_SEND/RECV blocks. If the blocks are not called, the last transferred IO data and IOCS/IOPS data are taken as valid.
  • Page 250 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Example In a normal situation (depending on the total length of the IO data), the block will run over several user program cycles until the condition code DONE/NDR = 1 is signaled.
  • Page 251 “write data record” function. This is done using the maintenance data record “IM1” with index AFF1 You will find details of the supported data records and their structure at the following Internet address: http://support.automation.siemens.com/WW/view/en/19289930 Call Interface Call interface in FBD representation: PNIO_RW_REC...
  • Page 252 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Example in STL representation: Explanation CALL FB 52, DB 52 // PNIO_RW_REC block call (read/write data record) CPLADDR := W#16#0110 // Module address from hardware configuration WRITE_REC := M 1.1 // TRUE: write data record;...
  • Page 253 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Paramet Declarat Data Possible Remarks type Values IN_OUT The maximum length is Read data record: 480 bytes. OUTPUT parameter only; after a successful read, the length of the read data record is indicated; otherwise 0.
  • Page 254 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Table 7-13 PNIO_RW_REC codes DONE ERROR STATUS Meaning 8183 No PNIO controller configuration, wrong CPLADDR CP in STOP mode 8184 System error or illegal parameter type 8185 Destination buffer (RECORD) is too short. 8F22 Area length error reading a parameter (e.g.
  • Page 255 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Table 7-13 PNIO_RW_REC codes DONE ERROR STATUS Meaning 80C2 There are too many jobs pending 80C3 Resources occupied (memory) 80C4 Communication error: (occurs temporarily and a repetition in the user program will often remedy the problem).
  • Page 256 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs 7.8.7 FB 54 PNIO_ALARM FB54 is used for alarm evaluation by a CP 343-1 operating as PROFINET IO controller and should be called in its user program when the ADD_INFO parameter in FC12 is not equal to 0.
  • Page 257 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Example in STL representation: Explanation CALL FB 54, DB 54 // PNIO_ALARM block call (read/write data record) CPLADDR := W#16#0110 // Module address from hardware configuration DONE := M 1.1 // Address for return parameter DONE ERROR := M 1.2...
  • Page 258 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Paramet Declarat Data Possible Remarks type Values OUTPUT WORD Logical start address of the PNIO component that triggers the alarm (module or submodule). For an output module, bit 15 is set (example of output address 5: ID:=DW#16#8005).
  • Page 259 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Note For entries with the coding 8Fxx note the information under STATUS in the Reference Manual “STEP 7 - System and Standard Functions for S7-300 and S7-400”. The chapter describing error evaluation with the RET_VAL output parameter contains detailed information.
  • Page 260 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Table 7-14 Condition Codes PNIO_ALARM DONE ERROR STATUS Meaning 80B0 Module does not recognize the data record 80B1 The specified data record length is wrong The CP changes to STOP 80C0 The data record cannot be read 80C1...
  • Page 261 7 Programming FCs (Functions) and FBs for S7 Ethernet CPs Configuration Limits / Resources Required by the FCs and FBs Notice Please note the version information of the blocks. Blocks with other versions have different resource requirements. Table 7-15 Information for FCs / FBs with an S7-400 NAME Version FC/FB...
  • Page 262 8 NCM S7 Diagnostics The NCM S7 Diagnostics described here provides dynamic information on the operating state of the communication functions of online CPs. This chapter provides a general overview of the individual diagnostic functions. The following checklist will help you to recognize several typical problems and their possible causes and shows how you can use the NCM S7 for PROFIBUS diagnostics tool to remedy the situation.
  • Page 263 8 NCM S7 Diagnostics Overview Diagnostic Options in STEP 7 STEP 7 provides you with a graded concept allowing you to query information about the status of your SIMATIC S7 components and functions and to sort out problems in a variety of different situations. These options cover the following: S Hardware Diagnostics and Troubleshooting with STEP 7 Hardware diagnostics provides dynamic information on the operating mode of modules including CPs when the S7 station is online.
  • Page 264: Functions Of Ncm S7 Diagnostics

    8 NCM S7 Diagnostics Functions of NCM S7 Diagnostics Functions The diagnostic functions can be grouped as follows: S General diagnostic and statistical functions S Type and mode-dependent diagnostic functions General diagnostic and statistical functions Regardless of the configured mode of the Ethernet CP, the following diagnostic functions are possible: S Querying the operating mode on Ethernet S Querying the event messages recorded on the Ethernet CP (diagnostic buffer)
  • Page 265: Installing And Starting Ncm S7 Diagnostics

    8 NCM S7 Diagnostics 8.2.1 Installing and Starting NCM S7 Diagnostics Installation NCM S7 Diagnostics is an integrated component of the NCM S7 for Industrial Ethernet optional package. NCM S7 Ethernet Diagnostics is installed along with NCM S7 for Ethernet on your There are several ways in which you can start the diagnostic tool: S Aus dem Standard-Startmenü...
  • Page 266 8 NCM S7 Diagnostics Structure In the same way, for example, as the SIMATIC Manager, NCM S7 Diagnostics appears as a separate two-part application window with a menu and toolbar: Navigation area with diagnostic objects Content area with the diagnostic result S In the navigation area on the left-hand side, you will find the hierarchically arranged diagnostic objects.
  • Page 267: General Menu Commands

    8 NCM S7 Diagnostics 8.2.2 General Menu Commands Overview When running diagnostic functions, the following menu commands have general significance. Depending on the context, other functions may be available; for more detailed information refer to the online help for NCM Diagnostics. Table 8-1 Meaning of the Menu Commands Menu...
  • Page 268 8 NCM S7 Diagnostics Table 8-1 Meaning of the Menu Commands Menu Meaning Options Customize With this menu command, you set the general parameters for the diagnostic " session. Dialog update time This sets the interval at which the diagnostic data is updated in a contents area when cyclic updating is selected.
  • Page 269: Starting Diagnostics

    8 NCM S7 Diagnostics Starting Diagnostics 8.3.1 Establishing a Connection to the Ethernet CP Initial Situation Establish the physical connection between the PG and the SIMATIC S7 Station. There are two ways of doing this: S MPI S Industrial Ethernet (ISO protocol) S Industrial Ethernet TCP/IP (IP protocol) S PROFIBUS Ways of Starting Diagnostics...
  • Page 270: Starting Diagnostics From The Windows Start Menu

    8 NCM S7 Diagnostics 8.3.3 Starting Diagnostics from the Windows Start Menu If there are no configuration data on your PG/PC, follow the steps outlined below to start diagnostics with a connected CP: 1. Open the Windows Start menu and select the command SIMATIC STEP 7 "...
  • Page 271 8 NCM S7 Diagnostics Examples of an Online Path without Gateway Rack / slot : 0/4 S7 - 300 PG/PC Node address (MAC): 08-00-06-01-02-03 Attachment of target station: Industrial Ethernet Figure 8-1 CP requiring diagnostics can be reached directly Rack / slot : 0/5 S7 - 300 PG/PC Node address (MAC):...
  • Page 272: Using A Gateway

    8 NCM S7 Diagnostics 8.3.4 Using a Gateway Case a: One gateway If the CP you want to check with diagnostic functions can only be reached via a gateway, you must select the device and specify its node address in the local network.
  • Page 273 8 NCM S7 Diagnostics Case b: Several Gateways If the CP requiring diagnostics can only be reached over several gateways, you only specify the first gateway. Routing over the other gateways is done automatically. Node address (gateway) (MAC): 08-00-06-01-02-03 S7 - 300 PG/PC Rack / slot : 0/5 Attachment of gateway:...
  • Page 274: Using The Pc Station - Setting A Gateway With "Pc Internal

    8 NCM S7 Diagnostics 8.3.5 Using the PC Station - Setting a Gateway with “PC internal” There is a special situation when you use your PC/PG as a PC station and have therefore set the interface to PC internal (local) in “Setting the PG/PC Interface”. You must them set parameter values for the gateway, even when you do not need to go through any other gateway to reach the target station.
  • Page 275: Other Ways Of Starting Diagnostics

    8 NCM S7 Diagnostics 8.3.6 Other Ways of Starting Diagnostics Starting in the properties dialog of the connections: 1. Select the PLC Activate Connection Status menu command to activate " online access. 2. Select the “Special Diagnostics” button in the “Status Information” tab. Starting in the hardware configuration tool HW Config: 1.
  • Page 276: How To Use Diagnostics

    8 NCM S7 Diagnostics How to Use Diagnostics Procedure To use diagnostics efficiently, particularly when working with the diagnostic tool for the first time, the following procedure can be recommended. 1. Use the sequence shown below as a basis for using diagnostics: Start NCM S7 Diagnostics: - Establish the connection to the CP (Section 8.3 - Set the options (Section 8.2.2)
  • Page 277: Starting Diagnostic Functions Explicitly

    8 NCM S7 Diagnostics Starting Diagnostic Functions Explicitly The following table shows the diagnostic options that exist in the available functions. Table 8-3 General Diagnostic and Statistical Functions Diagnostic Diagnostic Aims Special Features Functions / Diagnostic Object CP information The aim is to identify the CP to which NCM S7 Diagnostics is connected and to find out the current mode.
  • Page 278 8 NCM S7 Diagnostics Table 8-4 Mode-Dependent Functions Diagnostic Diagnostic Aims Special Features Functions / Diagnostic Object To display and monitor communication connections. You obtain an overview or detailed information in the contents area depending on the diagnostic object you select. Connections Overview of All Connection Types By double-clicking the objects in the...
  • Page 279: Checklist For "Typical Problems" In A System

    8 NCM S7 Diagnostics Checklist for “Typical Problems” in a System Meaning The following lists contain several typical problems and their possible causes and how you can use the NCM S7 Ethernet Diagnostics tool to remedy the situation. The checklists deal with the following topics: 1.
  • Page 280: Checklist For General Cp Functions

    8 NCM S7 Diagnostics 8.6.1 Checklist for General CP Functions Table 8-5 Checklist for Typical Problems When Operating a CP in a System Problem Possible Cause Identifying the Cause and Remedy The Ethernet CP will not Invalid configuration Yellow STOP LED and red SF LED lit change to the RUN mode.
  • Page 281: Communication Connections Checklist

    8 NCM S7 Diagnostics 8.6.2 Communication Connections Checklist Table 8-6 Checklist for Typical Problems with ISO Transport / ISO-on-TCP / UDP Connections Problem Possible Cause Identifying the Cause and Remedy No data transfer on an AG-SEND and AG-RECV Check the user program. ISO transport connection are not called in the user Evaluate status bytes in AG-SEND and...
  • Page 282: Firmware Loader

    9 Firmware Loader This chapter will familiarize you with the uses and handling of the Firmware Loader. The Firmware Loader allows you to download more recent firmware versions to the SIMATIC NET modules. For more detailed information on the various load options, refer to the integrated help.
  • Page 283: Application

    9 Firmware Loader Application Firmware Here, firmware means the system programs in the SIMATIC NET modules. Uses of the Firmware Loader The Firmware Loader allows you to download more recent firmware versions to the SIMATIC NET modules. It is used on the following: S PROFIBUS modules S Industrial Ethernet modules S Modules for Gateways (for example, IE/PB Link)
  • Page 284: Loading Firmware

    Make sure that the load file you are using is intended as an update for the version of the firmware contained on your module. If you are in any doubt, contact your local Siemens advisor. Caution Remember that interrupting the download can lead to an inconsistent state on the...
  • Page 285: A Pinout

    A Pinout 24 V DC Connector Terminal Function +24 V Ground RJ-45 Jack for Twisted Pair Ethernet CPs with One Connector Pin No. Signal Name Function TP- / Transmit + TD_N TP- / Transmit - TP- / Receive + RD_N TP- / Receive - The pinning of the RJ-45 jack corresponds to the IEEE802.3 twisted pair interface.
  • Page 286: Connector For Industrial Ethernet

    A Pinout Connector for Industrial Ethernet Pinning - 15-Pin Sub-D Female Connector Pin No. Signal Name Function MEXT External ground, shield CLSN Collision + TRMT / TPETXD Transmit + / TPE Transmit Data + Ground Ground 5 V RCV / TPERXD Receive + / TPE Receive Data + M 15 V Ground 15 V...
  • Page 287: B Standards And Approvals For Simatic Net S7-Cps

    B Standards and Approvals for SIMATIC NET S7-CPs B Standards and Approvals for SIMATIC NET S7 - CPs Product Description: S CP 343-1 Lean (CX00) Order number: 6GK7 343-1CX00-0XE0 S CP 343-1 Lean (CX10) Order number: 6GK7 343-1CX10-0XE0 S CP 343-1 Order number: 6GK7 343-1EX21-0XE0 S CP 343-1 Order number: 6GK7 343-1EX30-0XE0...
  • Page 288 S 94/9/EEC „Equipment and Protective Systems for Use in Potentially Explosive Atmospheres (Explosion Protection Directive) The EU conformity certificates are available for the responsible authorities according to the above-mentioned EU directive at the following address: S Siemens Aktiengesellschaft Bereich A&D Industrielle Kommunikation SIMATIC NET Postfach 4848...
  • Page 289 B Standards and Approvals for SIMATIC NET S7-CPs Directive on Machines The product remains a component in compliance with Article 4(2) of the EU directive on machines 89/392/EEC. According to the directive on machines, we are obliged to point out that this product is intended solely for installation in a machine.
  • Page 290 B Standards and Approvals for SIMATIC NET S7-CPs UL Approval UL Recognition Mark Underwriters Laboratories (UL) according to standard UL 508: S Report E 85972 CSA Approval CSA Certification Mark Canadian Standard Association (CSA) according to standard C 22.2 No. 142: S Certification Record 063533–C-000 cULus Approval, Hazardous Location CULUS Listed 7RA9 IND.
  • Page 291 B Standards and Approvals for SIMATIC NET S7-CPs Note This equipment is suitable for use in Class I, Division 2, Group A, B, C, D or non-hazardous locations only. Notice For devices with C-Plug memory: The C-Plug memory module may only be inserted or removed when the power is off.
  • Page 292: C References And Literature

    For installation and commissioning of the CP SIMATIC S7 S7-300 Automation System - Hardware and Installation: Installation manual - Module Data: Reference manual Siemens AG SIMATIC S7 S7-400, M7-400 Automation System - Hardware and Installation: Installation manual - Module Data: Reference manual...
  • Page 293 - the manual package NCM S7 for Industrial Ethernet - the online documentation in STEP 7 / option NCM S7 for Industrial Ethernet Siemens AG SIMATIC Configuring Hardware and Connections with STEP 7 Part of the STEP 7 documentation package STEP 7 Basic Knowledge...
  • Page 294 Berger, H. / Publicis-MCD-Verlag, 2001 /18/ On project engineering of PROFINET components and systems: Basic help in the SIMATIC iMap engineering tool Siemens AG /19/ On project engineering of PROFINET CBA components and systems: Component based Automation - Configuring Plants with SIMATIC iMap...
  • Page 295 C References and Literature Order Numbers The order numbers for the SIEMENS documentation listed above can be found in the catalogs “SIMATIC NET Industrial Communication, Catalog IK PI” and “SIMATIC Programmable Controllers SIMATIC S7 / M7 / C7”. You can obtain these catalogs and any further information you require from your local SIEMENS office or national head office.
  • Page 296: D Glossary

    D Glossary General Section ..........A -297 Industrial Ethernet .
  • Page 297: General Section

    D Glossary General Section Baud rate -> transmission rate Broadcast A broadcast is like ”calling all stations”: Using one broadcast frame, you can reach all nodes that are prepared to accept broadcast frames. Bus segment Part of a -> subnet. Subnets can consist of bus segments and connectivity devices such as repeaters and bridges.
  • Page 298: Industrial Ethernet

    D Glossary Functions (FCs) STEP 7 code blocks of the type ”function”. Gateway Intelligent connectivity device that connects local area-> networks of different types at the ISO Layer 7 level. Industrial Ethernet A LAN system complying with IEEE 802.3 (ISO 8802-2) Multicast A multicast is like ”calling all group stations”: Using one multicast frame, you can reach all the nodes that belong to the multicast group and that are prepared to...
  • Page 299: Profinet

    Services Services provided by a communication protocol. SIMATIC NET Siemens SIMATIC Network and Communication. Product name for -> networks and network components from Siemens. (previously SINEC) SIMATIC NET Ind. Ethernet SIMATIC NET LAN system for industrial applications based on Ethernet.
  • Page 300 D Glossary SINEC Previous product name for-> networks and network components from Siemens. Now: SIMATIC NET Station A station is identified by a S MAC address in the Ethernet network S PROFIBUS address in the PROFIBUS network Subnet A subnet is part of a -> network whose parameters (for example -> PROFIBUS) must be matched.
  • Page 301 D Glossary Transmission rate According to DIN 44302, this is the number of binary decisions transmitted per time unit. The unit is bps. he set or selected transmission rate depends on various conditions, for example the distance across the network. Watchdog Mechanism for monitoring operability.
  • Page 302 D Glossary ISO - on - TCP Transport layer connection (layer 4 communication complying with ISO) simulated on TCP. On an ISO-on-TCP connection, messages can be exchanged in both directions. TCP provides the data flow communication without segmenting the data into messages.
  • Page 303 D Glossary S5S5 connection see ISO transport connection Subnet mask The subnet mask specifies which parts of an IP address are assigned to the network number. The bits in the IP address whose corresponding bits in the subnet mask have the value 1 are assigned to the network number. Subnet number A ->...
  • Page 304 D Glossary Interconnection General: Logical data connection between two objects. With PROFINET CBA in SIMATIC iMap: Connection between two technological functions. An output is interconnected with an input of the same type. Interconnections are represented in SIMATIC iMap by lines. Network view With PROFINET CBA: View of the devices and the networks (Ethernet, PROFIBUS) in SIMATIC iMap.
  • Page 305 A PROFINET component always includes a technological function and the corresponding device. SIMATIC IMap Engineering tool from Siemens for PROFINET CBA. Allows the configuration, commissioning, and monitoring of modular, distributed automation systems based on the PROFINET standard. SIMATIC iMap - STEP 7 AddOn Software for the SIMATIC iMap interface to STEP 7.
  • Page 306: E Linking To Other Systems With Fetch/Write

    E Linking to Other Systems with FETCH/WRITE The FETCH and WRITE modes supported on ISO transport connections, TCP, and ISO-on-TCP connections can be used with any other device to access the S7 system memory areas. To be able to use this type of access, for example for PC applications, you need to know the PDU structure of the jobs.
  • Page 307 E Linking to Other Systems with FETCH/WRITE a) Structure of WRITE Frames The meaning and values of parameters shown without values in the following table “Parameter Values“. can be found in the section WRITE request frame WRITE acknowledgment frame System ID =”S”...
  • Page 308 E Linking to Other Systems with FETCH/WRITE a) Structure of FETCH Frames The meaning and values of parameters shown without values in the following table “Parameter Values“. can be found in the section FETCH request frame FETCH response frame System ID =”S”...
  • Page 309 E Linking to Other Systems with FETCH/WRITE Parameter Values S7 Address Area ORG ID Source/dest. Source/dest. Source/dest. Source/dest. data from/to data from/to data from/to data from/to data block in flag area process process main memory image of the image of the inputs (PII) outputs (PIQ) DBNR...
  • Page 310 E Linking to Other Systems with FETCH/WRITE PI/PQ Address Area ORG ID Source/dest. Source/dest Source/dest data from/to in data from/to data from/to I/O modules. counter cells timer cells With source data input modules, with dest data output modules DBNR irrelevant irrelevant irrelevant Start address...
  • Page 311 F Document History This section provides an overview of the previous releases of this manual and the functional expansions in STEP 7 and NCM S7. New in release 06 / STEP7 V5.4 SP1 (C79000 - G8976 - C182 - 06) Apart from various adaptations to the currently available devices and the current version of STEP 7/NCM S7 V5.4 SP1, the following modifications were included: S Configuration of the CP mode PROFINET IO device...
  • Page 312: F Document History

    F Document History New in release 03 / STEP 7 V5.3 SP3 (C79000 - G8976 - C182 - 03) Apart from various adaptations to the currently supplied devices and the current version of STEP 7/NCM S7 V5.3 SP2/SP3, the following features were included: S New blocks for user programs - There is a new block FC10 AG_CNTRL available for the SEND/RECEIVE interface...
  • Page 313 F Document History In some situations, it is an advantage to set up communication connections not over the configuration interface of STEP 7 but program-controlled by specific applications. As of STEP 7 V5.2 SP1, a function block is available for these applications that allows flexible transfer of data blocks with configuration data to an Ethernet CP.
  • Page 314 F Document History New in release 04 / up to STEP 7 V5.1 SP2 (C79000 - G8976 - C129 - 04) S The FETCH/WRITE mode is now supported on TCP connections. See Chapter 5. S The FETCH/WRITE mode can be coordinated in the user program by the new FCs AG_LOCK and AG_UNLOCK.
  • Page 315 Connection ID, A-170 range of values, A-170 Access coordination, A-209 Connection types, parameter fields for, A-170 Address parameters Connector for Industrial Ethernet, Pinning - Broadcast, A-149 15-Pin Sub-D Female Connector, A-286 broadcast, A-148 Connector for PROFIBUS, 9-pin D-sub female unspecified ISO-on-TCP connection, A-129 connector, A-286 unspecified TCP connection, A-137 CP address, A-181...
  • Page 316 Functions ISO-on-TCP connection AG-RECV, A-91, A-92 addresses, A-127 AG-SEND, A-91, A-92 checking, A-130 Functions (FC), typical sequence, A-93 parameter field for, A-173 Functions (FCs) properties, A-124 AG -RECV / AG_LRECV, A-201 specifying the connection partner, A-125 AG -SEND / AG_LSEND, A-193 AG_LOCK, A-211 AG_LOCK / AG_UNLOCK, A-209 AG_UNLOCK, A-213...
  • Page 317 SEND/RECEIVE interface, A-17 CPU cycle, A-95 PC internal, A-274 data exchange, A-91 PG communication overview, A-31 in configured mode, A-25 user program, A-92 in PG operation, A-25 SIMATIC mode, A-73 with STEP 7 on PROFIBUS, A-25 SIMATIC NET, A-5, A-16 PG operation, with STEP 7 via Ethernet, A-23 Subfield types, A-177 PG/PC interface, A-27...

Table of Contents