Siemens S7-1200 Manual

Siemens S7-1200 Manual

Ethernet/ip scanner for simatic
Hide thumbs Also See for S7-1200:
EtherNet/IP Scanner
for SIMATIC
S7-1200/ S7-1500/ EtherNet/IP
https://support.industry.siemens.com/cs/ww/en/view/109782314
Siemens
Industry
Online
Support
Table of Contents
loading

Summary of Contents for Siemens S7-1200

  • Page 1 EtherNet/IP Scanner for SIMATIC Siemens S7-1200/ S7-1500/ EtherNet/IP Industry Online https://support.industry.siemens.com/cs/ww/en/view/109782314 Support...
  • Page 2: Legal Information

    Proper use of Siemens products Note the following: Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation. If products and components from other manufacturers are used, these must be recommended or approved by Siemens.
  • Page 3 Trademarks All names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owner. Disclaimer of Liability We have reviewed the contents of this publication to ensure consistency with the hardware and software described.
  • Page 4: Table Of Contents

    Table of contents Table of contents Legal information ......................2 Preface ........................ 5 Introduction ......................7 Description ................... 7 EtherNet/IP ................... 8 Function principle ................. 9 Scope of delivery ................10 Commissioning ....................11 Preparation ..................11 Connecting the hardware components ..........11 Configuration/Engineering ................
  • Page 5: Preface

    Required basic knowledge General knowledge in communications over Ethernet, programming and configuring the S7-1200 or S7-1500 with the TIA Portal is assumed and will not be part of this document. It is also assumed that the terms Server and Client and their meaning are familiar to the reader.
  • Page 6 V15.1 Update 4 MFCT V1.0 In this application example the S7-1500 is operated as EtherNet/IP Scanner, while the S7-1200 is operated as EtherNet/IP adapter. The application example for the LCCF_EnetAdapter function block can be downloaded using the SIOS ID: 109782315 https://support.industry.siemens.com/cs/ww/en/view/109782315...
  • Page 7: Introduction

    ET200SP MF interface module. The S7-1500 shown in the below schematic is operated as the device controlling the field devices. NOTE The roles of the S7-1200 and S7-1500 can be exchanged without changes in the description as the LCCF_EnetScanner function block exists for both systems. Figure 2-1: simplified setup...
  • Page 8: Ethernet/Ip

    2 Introduction EtherNet/IP Even though in the above schematic setup the cables are named with PROFINET/ IE, any other Ethernet based protocol can co-exist on the same network. Especially if such protocol uses IP as networking protocol and either TCP or UDP as transport protocol.
  • Page 9: Function Principle

    Scanner is configured to exchange data with two Adapters. One adapter is the ET200SP MF in EtherNet/IP fieldbus mode. The second adapter is represented by the S7-1200 using the also available LCCF_EnetAdapter function block. This is schematically shown on the next page’s figure.
  • Page 10: Scope Of Delivery

    MFCT project for an exemplary configuration of the ET200SP MF as well as an EDS file for each of the field devices. The program in the TIA Portal program can be easily adopted into a “S7-1200 as Scanner” scenario, as the LCCF_EnetScanner function block uses the identical parameterization.
  • Page 11: Commissioning

    The first option is the Line topology as shown below: Figure 3-1: Line topology setup SIMATIC SIMATIC SIMATIC S7-1500 ET200SP MF S7-1200 PN PN PN PN PN PN PROFINET / IE NOTE The line topology is an easy to setup topology. Although it does not allow network debugging as easy on a protocol level.
  • Page 12 3 Commissioning Another topology is the star topology, which in the application example is used. It is shown in the next schematic. Figure 3-2: Star topology setup SIMATIC SIMATIC S7-1200 S7-1500 PN PN PN PN SCALANCE X208 PN PN PROFINET / IE...
  • Page 13: Configuration/Engineering

    4 Configuration/Engineering Configuration/Engineering Creating and managing projects To follow along with this application example the TIA Portal project should have been downloaded from SIOS. NOTE A new TIA Portal project may also be created as it allows to adopt the hardware platform accordingly.
  • Page 14 4 Configuration/Engineering Step Instruction Result Open the existing OB The block opens in the editor. “taskEnetScanner” with a double-click on it. Place a call to the LCCF_EnetScanner As the result the block call is placed onto the network. with the instance DB. In this example the instance DB is named “InstScanner”...
  • Page 15: Creating The Ethernet/Ip Io System

    4 Configuration/Engineering Step Instruction Result Assign the interface you want to use to the actual parameter of the block call NOTE It is recommended to use the TIA Portal maintained global constants for the interface identifier. Otherwise the function block may not work properly. However, any Open User Communication (OUC) capable interface may be used, including Industrial Ethernet CM or CP extension cards.
  • Page 16: Creating An Adapter Description

    ET200SP MF. It has the IP address 192.168.74.46, which is also shown in the below IP address overview. Table 4-2: IP addresses Role System IP address EtherNet/IP Scanner S7-1500 192.168.74.12 EtherNet/IP Adapter ET200SP MF 192.168.74.46 S7-1200 192.168.74.45 EtherNet/IP Scanner Entry-ID: 109782314, V1.1.0, 04/2021...
  • Page 17: Eds Files

    4 Configuration/Engineering Further addressing information are necessary. They will be retrieved from an electronic data sheet (EDS), which is like a GSD file known from PROFINET and PROFIBUS systems. 4.2.2 EDS files The EDS file format is standardized by the ODVA® and is text based and human readable.
  • Page 18 4 Configuration/Engineering Device parameters The device describing parameters are relevant for the Scanner, as it uses this information to verify the real existing device against the configured device. In case there is a mismatch the operation of this device is not started. Such information is: •...
  • Page 19 4 Configuration/Engineering Data sizes and update times In the [Params] section, several parameter sets are defined, which are used later in the EDS file. The relevant information for the configuration of the EnetIoSystem are here • Update interval • Size of Inputs and Outputs Figure 4-6 [Params] section RPI and Output Data size In the above shown figure the parameter, marked with 1 describes the RPI called “Requested Packet Interval”...
  • Page 20 4 Configuration/Engineering Figure 4-7: [Params] section Input Data and Configuration Data size Same as in the previous figure the with 1 marked area shows a relevant parameter. In here the size of the Input Data is defined. The valid range is between 0 and 500 Bytes.
  • Page 21 4 Configuration/Engineering Figure 4-8: EnetIoSystem configuration for RPI and data sizes In the above shown figure the settings are made for the three connection points, which are: • conPointOrigTarget → Originator to Target direction • conPointTargetOrig → Target to Originator direction •...
  • Page 22 4 Configuration/Engineering AssemblyID and Connection Point IDs They are called the Assembly instances, AssemblyIDs, or pointIdentifier. The EDS file contains them in a somewhat cryptic way in the [Connection Manager] section. In the below shown figure the with “Path” commented line (line 202) is of particular interest as it contains the access path to the assembly objects.
  • Page 23 4 Configuration/Engineering Wrong decoding of the Connection Point or Instance IDs can occur. NOTICE As the byte ordering is “big endian” in the EDS file, the numbers may be mistakenly ordered in “little endian” and therefore decoded wrong. This may end up addressing the wrong connection points causing non-functional behavior of the LCCF_EnetScanner block.
  • Page 24 4 Configuration/Engineering Figure 4-10: EnetIoSystem configuration for RPI and data sizes This finishes the configuration of the ET200SP MF as EtherNet/IP adapter for the LCCF_EnetScanner function block. Finalizing the parameterization As the LCCF_EnetScanner block has not been completely parameterized, the document will now show the next necessary steps to achieve this.
  • Page 25 Extend the “adapters” array to You will get a new entry for the second accommodate 2 adapters. adapter. Confirm your entry Enter the IP address of the second In this document it is the S7-1200 with adapter. 192.168.74.45 EtherNet/IP Scanner Entry-ID: 109782314, V1.1.0,...
  • Page 26 4 Configuration/Engineering Step Instruction Result Open the EDS file of the second The following data are used in this adapter with you text editor program application example (e.g. Notepad). From sections Note the relevant data from the differerent sections [Device] •...
  • Page 27 4 Configuration/Engineering Step Instruction Result Assign the variables to the The LCCF_EnetScanner is now corresponding parameters of the parameterized with its minimum set of LCCF_EnetScanner. parameters. Compile and download the program to the PLC. If it hasn’t been already, put the PLC into RUN Mode.
  • Page 28 4 Configuration/Engineering NOTE When operating the S7-1200 as EtherNet/IP adapter the configuration data can be used to transfer additional data, such as parameter sets. This will be done once on startup and acyclic at a fixed rate of every 5s. The configuration data size is set to 64 bytes fixed in the EDS file.
  • Page 29: Operating

    5 Operating Operating Start the application The application will be operated by simply toggle the “enable” input parameter of the LCCF_EnetScanner function block to “TRUE” and monitor the exchanged data. For this follow the below instructions as a watch table has been prepared in the application examples TIA Portal project.
  • Page 30: Troubleshooting

    5 Operating Instruction Result Modify the output data and monitor the input data for each adapter To stop the LCCF_EnetScanner toggle As a result of that, the input values are the “enable” parameter to “FALSE”. frozen, the update stops. The LCCF_EnetScanner shuts down the connections to all configured adapters.
  • Page 31 5 Operating Table 5-2: physical checks observation possible cause remedy SIMATIC is not reachable SIMATIC is not powered up. • Check power supply and from TIA Portal wiring with the installation manual. • Correct wiring Power the Power Supply up SIMATIC doesn’t have •...
  • Page 32: Network Settings

    5 Operating 5.2.2 Network Settings Missing communication can be caused by any partner along the line of communication. Therefore, make sure the network settings for the devices are compatible to each other. In this application example the Ethernet settings for the scanner as well as for the two configured adapters are shown below.
  • Page 33 5 Operating For the ET200SP MF adapter the MFCT (MultiFieldbus Configuration Tool) is used. The settings are shown below Figure 5-2: Network Settings for Adapter[0]/ ET200SP MF Make sure the IP address settings are compatible to the settings of your scanner device.
  • Page 34: Simatic Program

    5 Operating Figure 5-3: Network Settings for Adapter[1]/ S7-1200 Here the settings are shown above to be: • IP: 192.168.74.45 • Mask: 255.255.255.0 5.2.3 SIMATIC Program Answering the following questions may give you a hint on what needs to be corrected.
  • Page 35 5 Operating The LCCF_EnetScanner block reports certain error codes to inform the user about issues in the execution. This document describes the status codes the LCCF_EnetScanner block reports in the chapter “Parameters” EtherNet/IP Scanner Entry-ID: 109782314, V1.1.0, 04/2021...
  • Page 36: Lccf_Enetscanner Block

    6 LCCF_EnetScanner block LCCF_EnetScanner block Parameters The LCCF_EnetScanner has been designed to require a minimum of parameters to make its use as easy as possible. Still a minimum external configuration is necessary, which is explained in the following chapter. A call to the LCCF_EnetScanner block requires an instance DB to store operation relevant data internally as shown in the below figure.
  • Page 37 6 LCCF_EnetScanner block Name Direction Data Type Description LCCF_typeEnetAdaptConfig. Refer to the chapter 4.2.1 “Creating an Adapter description” for details data InOut Array[*] of List of data areas for each LCCF_typeEnetAdaptData configured EtherNet/IP adapter to exchange data with. valid Output BOOL TRUE indicates that the values in the mapping variables are...
  • Page 38: Block Status Messages

    6 LCCF_EnetScanner block 6.1.1 Block status messages The LCCF_EnetScanner block reports a status information to the user, which follows a standardized pattern. The status code is split into the error flag and a status information value. Table 6-3: Error and status message format Error Info/ Warning Class Code...
  • Page 39 6 LCCF_EnetScanner block Valid Busy Error Status Cause Remedy Code (in hex) TRUE TRUE FALSE 16#76x2 Overload This warning indicates situation, updates an overload situation for adapters may on the scanner side. have been lost This can be avoided by increasing the “Communication load”...
  • Page 40 6 LCCF_EnetScanner block Valid Busy Error Status Cause Remedy Code (in hex) smaller than size. configured for adapter[x] FALSE FALSE TRUE 16#82x8 Parameterized Adjust the configured output buffer is O→T direction data smaller than size. configured for adapter[x] FALSE FALSE TRUE 16#82x9 Parameterized...
  • Page 41: Technical Data

    6 LCCF_EnetScanner block 6.1.2 Technical data For better planning of the automation program the user must be aware, that the operation of the LCCF_EnetScanner block has impacts on both memory loading and cycle time of the remaining automation program. As all the protocol handling is done as part of the user program, the cycle time will be extended by the time the selected CPU model requires to execute the protocol stack.
  • Page 42 1,5 ms 3,2 ms ET200SP MF 1 ms 2 ms 5 ms S7-1200 The measured load is based on a 10ms cyclic interrupt and the data exchange configured in the application example. Table 6-6: configured data exchange sizes Adapter Outputs...
  • Page 43 EtherNet/IP adapters. This is a compromise between many factors, such as update rates, CPU load and memory consumption. The S7-1200 controllers allow for more than 8 OUC resources, which can be used in specific applications. Risk of overloading the controller...
  • Page 44: What's Next

    6 LCCF_EnetScanner block What’s next? The current implementation leaves some room for further developments. Such implementations include: • Support for modular adapters • Identification of available adapters (read in network) • Improved status display for configured adapters • Inhibit individual adapters EtherNet/IP Scanner Entry-ID: 109782314, V1.1.0,...
  • Page 45: Appendix

    Industry Online Support Do you have any questions or need assistance? Siemens Industry Online Support offers round the clock access to our entire service and support know-how and portfolio. The Industry Online Support is the central address for information about our products, solutions and services.
  • Page 46: Industry Mall

    7 Appendix Industry Mall The Siemens Industry Mall is the platform on which the entire siemens Industry product portfolio is accessible. From the selection of products to the order and the delivery tracking, the Industry Mall enables the complete purchasing processing –...

This manual is also suitable for:

S7-1500

Table of Contents