Home
SIMATIC NET Step by Step: Ethernet Communication
Contents
1. Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 33 Configuration and Programming 2 2 1 Parameters of Subroutine ETHO_CTRL ET AGLETAL Imme en A EN CP_Ready CP_Ready Ch Ready Channel Ready Fehler Error CT AL Figure 2 14 Subroutine Input parameter EN Permanently set to 1 SMO 0 to excetute the subroutine in every cycle Output parameter CP_Ready 1 CP is ready to operate 0 CP not ready to operate Output parameter Ch_Ready Data type Word each individual bit of the lower byte is dedicated to a certain channel connection E g bit x 0 gt connection 0 The value of each bit indicates that the connection is established and ready for this channel or not High byte is not used yet Output parameter Fehler Data type Word provides an error code regarding the cause of the fault Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 34 Configuration and Programming 2 2 2 Cyclic Program Main Extract of AWL Code The following extract of code shows the principle operation of the subroutine to demonstrate the cyclic function call with the required parameter set Network 1 CP initialize LD Immer_ein CALL ETHO CTRL CP_Ready Channel Ready Error _CTRL Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 35 Download and Commissioning This chapter describes the download of the configura
2. 41 4 2 OPC Client OPC Scout General For operator control and monitoring the OPC Client sipped with SimaticNet PC Software is used More detailed description of the OPC Client can be found in the online help of SimaticNet Software To access data of an OPC Server the client has to start the server connect The client must at least add one group and than add items in that group If granted by the access rights the client than can access the data of the server Note Any other OPC Client can be used instead of OPC Scout however it must be compatible to the specification OPC Data Access 2 x Sep __Description _ The OPC Scout is launched with Start gt Simatic gt SimaticNet gt Industrial Ethernet gt SOFTNET Industrial Ethernet gt OPC Scout To connect to SimaticNet OPC Server the ProglD OPC SimaticNet must be selected and double clicked At least one group must be created Therefore the dedicated node New Group must be double clicked in the tree BeJorc Scout New Project1 Aee Fie Yiew Server Group Item S a S Ee lH 5 Servers and groups j Items incl status information Server s A S Local Server s 5 OPC Fix OPCHDA1 2 OPC SimaticHMI PTPro bf OPC SimaticNET Sa Group 1 2y OPC SimaticNET DP 2 OPCServer WinCC S eo Remote Server s MA1 DCS Yy Add Remote Servers s Successfully connected to OPC SimaticNET Figure 4 2 Step 3 Step by Step Ethernet Communication between OPC Server
3. step Cescription O O Z O O The PPI cable must be connected to the active CPU 2 In the opened S7 project Chart Status is launched with the button in the function bar 3 The symbolic name or the direct address of the favored variable must be prompted in the Address column Note The status bar in MicroWin shows whether the table is active or not If online the used bus transmission rate and status of CPU must be shown correctly Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 44 Glossary and Index 5 Client Demanding services and data COM Port Serial interface of the PC CP Communication Processor CPU Central Processing Unit MicroWIN Engineering tool for S7 200 controllers NetPro Engineering tool for Simatic Network connections OLE Object Linking and Embedding OPC OLE for Process Control PC Personal Computer IBM PC PLC Programmable Logic Controller PPI Point to Point Interconnection Server Providing services and data SIMATIC Siemens automation systems SimaticNet Network components for Siemens automation systems TSAP Transport Service Access Point Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 45
4. BJ Intel R PRO 100 VE General Interface profile for Intel R PRO 100 VE Ne lt Board 2 gt 3 Version ISO Ind Ethernet gt Intel R PRO 100 VE Ne lt Board 2 gt Address TCP IP gt Intel R PRO 100 VE Ne lt Board 2 gt Softnet IE SR test ED cP simulation Module reaction RJ Access points Restart Apply Cancel Help Figure 2 1 Step 1 Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 20 Configuration and Programming Sep __Deseriptin _ For the local PC Station a connection must be configured Using Start gt Simatic gt SimaticNet gt Settings gt Commissioning Wizard the wizard for configuring the local PC Station is started 3 In the second dialog of the wizard the PC Station Wizard is started by pressing the button SIMATIC NET Commissioning Wizard Configuration 2 4 Here you specify the configuration that will be used for this PC The SIMATIC NET PC Station Wizard will guide you through creating modifying or adopting a configuration PC Station Wizard When you have created your configuration please click the Next button Figure 2 2 Step 3 Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 21 Configuration and Programming Step escription The option Change local settings is selected and must be acknowledged by pressing the Next gt
5. Excel file incl VBA implementation as example e MicroWIN project file for download e SimaticNet OPC project file for observing variables Validity of this Manual This manual applies the following software versions Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Preface e SIMATIC MicroWin V3 2 SP1 or higher e SIMATIC NET S7 OPC Server is part of the SOFTNET S7 Windows 6 0 package of Industrial Ethernet Baugruppen MLFB SimaticNet S7 OPC Server 6GK1704 1CW60 3AA0 Simatic S7 224 DC Version 6ES7 214 1AD22 0XBO Simatic S7 224 Relais Version 6ES7 214 1BD22 0XBO Simatic CP243 1 6GK7 243 1EX00 0XE0 Required Documentation The following documentation contains additional information on the MicroWIN basic software of the SIMATIC S7 200 programmable controller and can be obtained from your local Siemens office 7 200 Dokumentation Automation System S7 200 6ES7 298 8FA22 8BHO e System Manual Basic information on the OPC Industrial Communication 6GK1 971 1GA00 0AA1 interface and installation and with SIMATIC NET commissioning of the e User Manual SIMATIC NET OPC Server Orientation in the General Documentation Landscape To set up the S7 controller and to prepare for operation you require the following documentation e Automation System S7 200 System Manual Structure of the Documentation The SIMATIC NET Documentation includes the following e Manual e Product inf
6. The installation of the Communication Processor the wiring and commissioning is described in an additional document Refer to the stated notes and the related product information Note Regarding this documentation a fault free installation wiring and commissioning of the Communication Processor CP 243 1 is assumed Step by Step The following steps describe the configuration of connections and programming of the CPU Important dialogs are illustrated Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 29 Figure 2 10 Step by Step Configuration and Programming Step escription From Step7 Microwin Ethernet Wizard is started This can be done using the menu bar Tools gt Ethernet Wizard or directly using the Navigation Bar left side The module position is set in the second dialog of the Wizard The default position 0 is located directly next to the CPU all other positions increase from there on Ethernet Wizard m Module Address Please select the address to assign to this CP243 1 module If your network provides a BOOTP server a service that will automatically assign IP addresses at startup you may choose to have an IP address automatically assigned IP Address 192 168 147 Subnet Mask 2552552550 Gateway Address 4 F J Allow the BOOTP server to automatically assign an IP address for the module m Module Connection Type Specify the communicatio
7. and S7 200 incl CP243 1 42 Step Description 4 To add variables OPC Items an additional window OPC Navigator is opened by double clicking the group Browsing the OPC Server the items are selected and taken over into the right hand item list by clicking the arrow button Finishing with OK the tags are added to the group and can be monitored 5 On right mouse button in the Value column the Write dialog shows up OPC Navigator The listed Item s will be added to Group C Connections 2 S7 Verbindung_1 3 objects M gy New Definition E mA A PE g PA MZ AT 4 DB A scan A aliases Gl A Ss o fz Fsg i Ete o ces M is selected 03 02 2003 1654 a Figure 4 3 Step 4 Note The window of OPC Navigators shows all variables that are known by the OPC Server The known address space of the Server can be extended using New Definition node in the tree The operator must type in the correct syntax for the variable to be successfully added Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 43 4 3 MicroWin Chart Status General For operator control and monitoring with Step7 MicroWin the so called Chart Status is used This table is created within the project connects online e g usually through PPl cable to the CPU
8. is described as client functionality Communication Relations The S7 OPC Server provides with respect to the OPC Client a server interface compliant to the dedicated OPC Standard With respect to the PLC the OPC Server acts as S7 Client and the PLC serves data as S7 Server OPC Client OPC Scout OPC function g SyncWrite OPC Server SimaticNet PC Station S7 Client Sapi S7 aktive S7 function S7 peer PLC Station S7 200 passive Figure 1 2 Client Server Relations Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Overview and Environment Connection Type Step by Step For communication between PC and controller this example uses the S7 Protocol Put Get services on TCP IP Between the two devices a S7 Connection must be established When communicating to OPC Server S7 200 are always passive thus the PC Station actively establishes the connection The S7 Connection is configured using NetPro Network Projection Tool as part of NCM software package Note Booth communication partners need information about the connection The single sided specified S7 Connection must be loaded into the PC Station The configuration will not be loaded into the PLC using NetPro However the connection also single sided specified must be configured and loaded into the 7 200 Ethernet Communication between OPC Server and S7 200 incl CP243 1 Overview and Environment 1 3 F
9. work for example e Training in or authorization for connecting up grounding or labeling circuits and devices or systems in accordance with current standards in safety technology e Training in or authorization for the maintenance and use of suitable safety equipment in accordance with current standards in safety technology e First aid qualification Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Preface Further Support If you have further questions on SIMATIC products please contact your local Siemens office or representative You will find the addresses in the catalogs on the Internet and in CompuServe go autforum Who to Contact If you have technical questions about using the software and your problem is not dealt with in the documentation or in the integrated help system please contact your Siemens representative or dealer You will find the addresses e Inthe Readme rtf file in the main folder of the SIMATIC NET CD e Internet http www siemens de simatic net e In Catalog IK PI License Note that you can only use the samples described on this CD if you have valid licenses for the software required Note You can obtain demonstration versions of the required software products for test or demonstration purposes and to familiarize yourself with the functions Certification The products and systems listed in this document are manufactured and marketed using a quality managemen
10. 43 1 31 Configuration and Programming Step escription The required properties are set for the requested connection The S7 200 runs as server and responds to connection requests of the OPC Server PC Station Additionally the local properties of the connection CP243 1 are set to the IP Address from which connect requests will be accepted here the IP of the PC Station must be typed in Within the remote properties of the communication partner the TSAP is defined here 10 11 compare NetPro S7 connection Properties gt Address Details Configure Connections x You have requested 1 connection s For each connection specify whether the connection should act as a client or server and configure its associated properties r Connection 0 1 connections requested This is a Client Connection Client connections request data transfers between the local PLC and a te server is is a Server Connection Servers respond to connection requests from remote clients m Local Properties Server r Remote Properties Client TSAP TSAP 10 00 10 11 I This server will connection with an Operator Panel OP I Accept all connection requests Accept connection requests from the following clients only 192 168 147 100 Ea IV Enable the Keep Alive function for this connection Please specify a symbolic name for this client connection Your program can reference this connection symbolica
11. PC Station automatically a local project Step7 project is generated that consists of PC Station representing the local computer This Step7 project locprj includes exactly one rack of type Simatic PC Station and this rack resides exactly one application of type OPC Server usually in slot 1 If the Ethernet adapter was set to configured mode the rack hosts a communication processor of type IE General usually in slot 5 Hardware Configuration HWKonfig The hardware configuration is generated and if required changed using the tool HWkKonfig Within the object properties of a device e g IE General the IP Address can be defined and the subnet mask is set The object properties of the OPC Server are used to change specific protocol settings However the default settings of the S7 protocol must not be changed for this example By pressing the button Save and Compile the system data is generated and with Download to Module this data is loaded into the device The Access Point of the application Step7 S7ONLINE must be set to PC internal local A detailed description can be found in the online help files related to SimaticNet PC Software Network configuration NetPro The network configuration is generated using the tool NetPro When selecting the application OPC Server additional connections can be added to the connection list The properties of a connection can be changed
12. SIEMENS SIMATIC NET Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Manual Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Overview and Environment Contents Overview and Environment Configuration and Programming Download and Commissioning Operator Control and Monitoring Glossary and Index Release 02 2003 Classification of Safety Related Notices This document 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 not taken Warning indicates that death or severe personal injury can result if proper precautions are not taken Caution with warning triangle indicates that minor personal injury can result if proper precautions are not taken Caution without warning triangle indicates that damage to property can result if proper precautions are not taken Notice indicates that an undesirable result or status can result if the relevant notice is ignored Note highlights important information on the product using the product or part of the documentation that is of particular importance and that will be of b
13. are PC Station IBM PC including Ethernet Card e g Communication Processor CP 1613 PLC Station SIMATIC S7 224 Controller including Ethernet Communication Processor CP243 1 Miscellaneous Ethernet Hub and 2x Ethernet Cable with RJ45 connector so called patch cable or 1x Cross Cable for direct connection devices Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Overview and Environment 1 6 Suitability for a Different Hardware Configuration Step by Step Important The samples relate to specific hardware configurations These must exist to ensure problem free operation If you want to use a different configuration adaptations will be necessary See also the notes below Note Using a different CPU e g CPU 222 If you want to use a different CPU you only need to run the Ethernet Assistant as part of Step7 MicroWin again and the Module Command Byte must be changed Using a different Ethernet card in the PC If you want to use a different PCI adapter from the CP1613 you only need to replace the adapter in the hardware configuration HWKonfig When using third party NIC the CP IE General must be selected Ethernet Communication between OPC Server and S7 200 incl CP243 1 Configuration and Programming 2 In this chapter the configuration of the PC Station and the programming of the Controller is shown in form of a Step by Step description Step by Step Ethernet Communic
14. ation between OPC Server and S7 200 incl CP243 1 Configuration and Programming 2 1 PC Station General After placing the Ethernet adapter e g CP 1613 in the PC Station the SimaticNet PC Software V6 x must be installed Installing the card the SimaticNet Software including the required license is described in a different document Refer to the notes in the product manual and related product information including the read me files Note Regarding this documentation fault free placement and fault free installation of SimaticNet PC Software and NCM PC Software is assumed Step by Step The following steps describe the configuration and set up of connections Important dialogs are illustrated Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Configuration and Programming Step escription The Ethernet adapter must be switched into Configured mode to be used with the OPC Server Using Start gt Simatic gt SimaticNet gt Settings gt Configuration Console the Ethernet Communication Processor is selected and inside Modules under General the operating mode is switched to Configured mode Configuration Console l Action View e alm e General Module properties PC Station Type of module fEthemet SS Bx SIMATIC NET Configuration f Applications Mode of the module C onfiqured mode fE Modules R cP5611 index 5
15. button In the following dialog the option Edit network and connection configuration must be selected confirmed with the Finish button Change Settings Which settings do you want to change If you select Change hardware configuration or Edit connections you must also specify the name of the PC station If you change local settings the local station is the default 2 2 Change hardware configuration module properties DP You can configure hardware settings and settings for specific drivers for example module addresses or operating modes PC station name PCStation Y You can modify the configuration of an attached network or edit add or delete communication connections PC station name PCStation f Open a project with the SIMATIC NCM Manager coct_ Hee _ Figure 2 3 Step 4 Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 22 Figure 2 4 Step by Step Configuration and Programming Sep __Deseripon __ The local PC Station is opened in the network and connection configuration tool NetPro A connection of type S7 connection must be created Therefore a double click in the connection list of the OPC Server application is required jaeNetPro locprj Network C Siemens Step7 Projects locprj 2 Network Edit Insert PLC View Options Window cor S S SS ee male S x Ethernet 1 Selection of the netwo
16. e g the connection can be renamed the local and remote P Address can be set and the TSAPs are defined All this properties characterize a unique connection The Access Point of the application Step7 S7ONLINE must be set to PC internal local A detailed description can be found in the online help files related to SimaticNet PC Software Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 38 Download and Commissioning 3 3 PLC Station General The PLC Station is build from CPU 224 and Communication Processor CP 243 1 After installation of Step7MicroWin software Version 3 2 SP1 upwards the Ethernet Wizard is available as configuration tool The Wizard guides through the required steps and generates the subroutine S7 Project The S7 Project is generated by MicroWin Besides the PLC program the project contains information about the used hardware e g CPU type From CPU S7 222 upwards connection the CP 243 1 is supported Ethernet Wizard The Ethernet Wizard is used for configuration and settings regarding connection properties The information is stored in a reserved memory area and the finally generated subroutine ETHO_CTRL accesses the configuration data The subroutine initializes the Communication Processor and transfers the data from the CPU to the CP and vice versa Thus the subroutine must be called cyclic Main the routine is downloaded together with the other part of th
17. e program The download can be done through the PPl cable or through the Ethernet CP itself once it has an IP Address A detailed description can be found in the online help of the Ethernet Wizard Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 39 Operator Control and Monitoring In this chapter the possibilities for accessing process data are described Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 4 40 4 1 Overview General Regarding this example process data can be set forced and monitored on two different ways In Step 7 MicroWin a chart is generated The variables in that table are updated online through the PPI cable or through the Ethernet connection Using the chart status single data points can be set The OPC Client OPC Scout shipped with the software package SimaticNet PC Software the OPC Server is started and connected through Ethernet the chosen variables are monitored Using OPC Scout data points can be written as well Block Diagram In the following diagram the possibilities of accessing process data are shown simplified illustration SimaticNet MicroWin OPC Client Chart Status OPC Scout ONLINE alternatively ONLINE over Ethernet Ethernet adapter PPI cable Ethernet CPU 224 CP 243 1 Figure 4 1 Control and monitoring Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1
18. ed to install and work on this equipment Qualified persons are defined as persons who are authorized to commission to ground and to tag circuits equipment and systems in accordance with established safety practices and standards Correct Usage of Hardware Products Please note the following instructions regarding the correct usage of hardware products Caution This device and its components may only be used for the applications described in the catalog or the technical description and only in connection with devices or components from other manufacturers which have been approved or recommended by 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 Before you use the supplied sample programs or programs you have written yourself make certain that no injury to persons nor damage to equipment can result in your plant or process EU Directive Do not start up until you have established that the machine on which you intend to run this component complies with the directive 89 392 EEC Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Correct Usage of Software Products Please note the following instructions regarding the correct usage of software products Caution This software may only be used for the applications described in the catalog or the technical description and only in connec
19. enefit to the user Copyright Siemens AG 1998 to 2003 All rights reserved The reproduction transmission or use of this document or its contents is not permitted without express written authority Offenders will be liable for damages All rights including rights created by patent grant or registration of a utility or design are reserved Siemens AG Bereich Automatisierungs und Antriebstechnik Geschiifts gebiet Industrie Automatisierungssysteme Postfach 48 48 D 90327 Niirnberg Siemens Aktiengesellschaft Disclaimer We have checked the contents of this manual for agreement with the hardware described Since deviations cannot be precluded entirely we cannot guarantee full agreement However the data in this manual are reviewed regularly and any necessary corrections included in subsequent editions Suggestions for improvement are welcomed Siemens AG 1998 to 2003 Technical data subject to change Printed in the Federal Republic of Germany 2 Trademarks SIMATIC SIMATIC NET SINEC and SIMATIC NET Networking for Industry are registered trademarks of Siemens AG Third parties using for their own purposes any other names in this document which refer to trademarks might infringe upon the rights of the trademark owners Safety Instructions Regarding your Product Before you use the product described here read the safety instructions below thoroughly Qualified Personnel Only qualified personnel should be allow
20. essssseseesssssssssrrssssessrnrnnsssessrens 34 22 2 Cyclic Program MM aa aia a Aaea 35 3 Download and Commissioning cccceeeeeeeeeeeeeeteeeeeeeeees 36 3 1 ON I sdai amansa ese ee ieee eee 37 3 2 PO StatiON sssrinin E TE ETE 38 3 3 POI ae tse esac E a E EEE 39 4 Operator Control and Monitoring ccceeseeeeeeeeeeeeeeeees 40 4 1 VARA 41 4 2 OPC Client OPC SCOUt eratoteivelesecireletacinotete rele teetebavevelatadoues 42 4 3 MicroWi Ghart SAMS opsien 44 5 Glossary and Nd EX isi wisiisicnecniisintanasasnscatavaieuntnicnuauedecavadadadaumund 45 Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Overview and Environment 1 In this chapter the sample plant and the functional principles of the environment are described Additional the required hard and software will be listed Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Overview and Environment 1 1 Schematic of the Environment Block Diagram The following figure shows the components of the sample plant in principle PC Station SimaticNet OPC Scout SimaticNet OPC Server PLC Station Ethernet CP Ethernet NIC CP 243 1 e g CP 1613 Industrial Ethernet Figure 1 1 Block Diagram Environment The controller consists of S7 200 PLC including the Ethernet communication processor CP243 1 Via Ethernet TP Twisted Pair the controller is connected to the PC Per
21. k Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 27 Configuration and Programming Step Description After confirmation of all following steps of the Commissioning Wizard using the buttons Next gt and Finish the Configuration Console opens up automatically Here the selection of protocols should be set to the actually used ones only Configuration Console Action view 4 am 2 Tree Select OPC protocol Select OPC protocol C PC Station The OPC Server can support various protocols at the same time ae SIMATIC NET Configuration Here you select the protocols it will support Applications E OPC settings A Exit OPC Server OP FMS T FDL TP Select OPC protocal P Symbols I s7 I SR PROFInet E OPC trace E Protocol trace Modules E Access points Apply Cancel Help Figure 2 9 Step 10 Note Depending on the selection of protocols the address space of the OPC Server can look different Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 28 Configuration and Programming 2 2 PLC Station General After installing the Communication Processor CP243 1 in the PLC Station a passive S7 connection must be configured When communication to the OPC Server the S7 200 must always be configured as S7 Server additionally the S7 200 will always be the passive communication partner
22. lly when initiating data transfers with the remote server m lt Prey Connection Next Connection gt Figure 2 12 Step 5 Note The settings of the IP Address and TSAP must be identically to the settings made during the connection configuration in NetPro PC Station Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 32 Configuration and Programming Step escription After finishing the connection configuration the required memory must be reserved to avoid overwriting of configuration data The configuration data is stored within the V memory Memory area of correct size must be provided The Wizard can suggest unused memory Ethernet Wizard Allocate Memory for Configuration The configuration block for this module requires 24 bytes of Memory With the options you have chosen the total size of the configuration is 159 bytes Please specify a starting address where the configuration will be placed in the Data Block The wizard can suggest an address that represents an unused block of Y memory of the correct size Lu suggest Addr YB159 through VB317 Figure 2 13 Step 7 Step escription O During the next step a subroutine ETHO_CTRL is generated and will be available in the engineering environment The subroutine ETHO_CTRL must be called once during each cycle Main The routine initializes the CP243 1 and provides the error codes
23. ns connection type for this module Auto Detect Communications 7 Step 3 Note The IP Addresses shown in the Figure are examples and can be different Note The BOOTP Server for dynamically assigning the IP Address should not be selected because configuration of the OPC Server s connection PC Station expects a fixed IP Address Ethernet Communication between OPC Server and S7 200 incl CP243 1 30 Configuration and Programming Step escription O To calculate the Command Byte all output bytes QB that are located before the CP243 1 must be added The next following not taken byte will be the Command Byte E g the onboard output bytes of CPU 224 use QBO and QB1 the next unused Command Byte will be QB2 Additionally the number of connections is set to be configured during the following dialogs Ethernet Wizard m Module Command Byte Determine the Q address by counting the output bytes used by any 1 0 modules attached to the PLC before the CP243 1 module aB 2 a m Peer to Peer Connections The CP243 1 module will support a maximum of 8 asynchronouse concurrent connections Select how many connections you wish to configure for this module Number of connections to configure for this module ff Sea Click Next gt to edit the connections for this configuration Figure 2 11 Step 4 Step by Step Ethernet Communication between OPC Server and S7 200 incl CP2
24. ormation e Installation instructions e Readme ixt files on the data medium of the software product Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Preface Finding Your Way Through the Manual To help you to locate specific information quickly the manual includes the following tools e At the start of the manual you will find a full table of contents and a list of figures and tables contained in the manual e Inthe chapters you will see a brief overview of the contents of the sections in the left margin e After the appendix there is a glossary that defines the most important technical terms used in the manual e At the back of the manual there is a detailed index that allows you to locate information quickly Documentation on Programming The appendix includes a list of the documentation you require to program and commission the S7 controller You will also find a list of technical books on the topic of programmable controllers CD ROM You can also order the entire SIMATIC S7 documentation as a collection on CD ROM Personnel Qualification Requirements Only qualified personnel should be allowed to install and work on this equipment Qualified personnel as referred to in the operating instructions or in the warning notes are defined as persons who are familiar with the installation assembly startup and operation of this product and who possess the relevant qualifications for their
25. rk ndustrial Ethernet PROFIBUS DP 82 PROFIBUS PA E Stations C Subnets PCStation Te PROFIBUS DP slaves for SIMATIC 57 x M7 and C distributed rack gt 0 from O selected In 4 Step 5 Ethernet Communication between OPC Server and S7 200 incl CP243 1 23 Configuration and Programming Step escription O When inserting the new connection the connection partner is marked as unspecified because the S7 200 Station S7 server is not part of the local project locprj that is representing the PC Station Insert New Connection d xj Connection Partner Station Unspecified Module x Connection Type s7 connection x I Display properties dialog Figure 2 5 Step 6 Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 24 Configuration and Programming Step Description 7 The properties dialog of the S7 connection needs the IP Address of the partner device here CP 243 1 Properties S7 connection Fized configured dynamic connection A Urneway M m ama PR07100 3 4 Figure 2 6 Step 7 Note The IP Addresses shown in the Figure are examples and can be different Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 25 Configuration and Programming Step escription By pressing the button Address Details the dialog for setting the connection resource
26. s is shown up The resources of the PC Station are pre selected by NetPro but for the unspecified partner S7 200 the resource must be typed in here 10 00 Address Details Figure 2 7 Step 8 Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 26 Configuration and Programming Step escription After closing all properties dialogs the new configuration must be complied using Save and Compile Than the S7 connection must be loaded into the PC Station using PLC gt Download gt Selected Stations jaeNetPro locprj Network C Siemens Step7 Projects locprj 2 Network Edit Insert PLC View Options Window Help Sla Sl ee i a ol Bt Ethernetf 1 esata Ethernet ea Pereo era e ee a EERE Ear Unkno Sfconnecton Yes sethernet 1 IE l i from 1 selected Insert Chg 7 Figure 2 8 Step 9 Note After downloading the PC Station a yellow exclamation mark flashes in the down right in the taskbar This indicates a new diagnostic message in the Station Configuration Editor stating a successful restart of the OPC Server and Ethernet adapter as well as the station manager Opening the Configuration Editor is interpreted as confirmation and the yellow exclamation mark disappears Note In the case of a faulty download the diagnostic messages of the Station Configuration Editor will reference the cause of failure e g wrong subnet mas
27. sonal Computer Inside the PC an Ethernet adapter e g 3Com CP1613 or others is connected through its driver to SimaticNet OPC Server which provides the data The OPC Scout an OPC Client that is shipped with SimaticNet displays the data from the OPC Server Note Using a direct connection between two Ethernet communication devices a so called Cross Cable is required Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Overview and Environment 1 2 General Description PLC Station When using the CP243 1 in an S7 200 environment the S7 Protocoll over Ethernet is supported The S7 Protocoll includes different services for communication The so called Variable services Put Get are used in this example Here the S7 200 acts as the passive communication partner meaning the S7 200 awaits the connection request and responds on Put Requests write data into the PLC or responds on Get Request read data from the PLC The S7 200 is passive and reacts on active requests thus the functionality is called a server Inside the S7 200 a passive S7 connection must be configured PC Station The PC supports the S7 Protocoll over Ethernet Here the protocol is executed on the network interface controller e g CP 1613 and the S7 OPCServer provides the data from the PLC The OPC Client OPC Scout starts the OPC Server and the server runs the S7 Protocoll services Put Get on the NIC The active call of services
28. t system complying with DIN ISO 9001 and certified by DQS certificate registration no 2613 The DQS certificate is recognized in all IQNet countries Reg No 2613 Standards and Approvals The S7 controllers meet the requirements and criteria of IEC 1131 Part 2 The S7 controllers meet the requirements for the CE Mark CSA UL and FM approvals have been obtained for the S7 controllers You will find more detailed information on the approvals and standards in the appendix Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Contents Contents 1 Overview and Environment cccccccesessseeeeeeeeeeeeeeeeeneeeeeeeees 10 Aga Schematic of the Environment ssc oicicinsnicanimascesaeedereceeereneenneeeceess 11 1 2 General Description seetcnmarewcoaaceis sein devaee ce htiaseaideledtcatebuaccatenke 12 1 3 Function DIA QIAN sesictccnestcteanencetesenstneescanentuceesnetzenneiuanivsctuaneeantiads 14 1 4 Required Software areemerreremen eee ares eoreee recent sor ce orneet eto neree mor rer err 15 1 9 Required Hardware goin sacstsecenittatesenizadanneseieaninnyigeeedsnesencceeueiaecass 16 1 6 Suitability for a Different Hardware Configuration 00 AF 2 Configuration and Programming eeeeeeeeeeeeeeeeeeeeeeeeeees 18 2 1 Lg Rc 2110 9 anane tr eter eee tee ee eee re eee tee 19 2 2 PEC StalON esena aee eara a a a e ve AAE AaS 29 2 2 1 Parameters of Subroutine ETHO_CTRL s
29. tion and program of all required components and the steps for commissioning Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 3 36 Download and Commissioning 3 1 Overview General The so called download describes the process to provide configuration information for the dedicated device Using an engineering tool Setp7 HWKonfig NetPro a configuration is created The configuration data includes information about the IP Address as well as connection information In addition system blocks including e g TSAPs are generated This system configuration data is transmitted to the device during the download of the station Block Diagram The following figure shows the devices and their configuration tools as used in this example Step 7 MicroWin Ethernet Wizard HWkKonfig NetPro incl information on CP 243 1 499 168 147 120 192 168 147 100 ER TSAP 10 00 TSAP 11 10 P S7 connection Figure 3 1 Download Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 37 Download and Commissioning 3 2 PC Station General The PC Station consists of Ethernet adapter and OPC Server After installing the SimaticNet PC Software the configuration tools HWKonfig Hardware Configuration and NetPro Network Configuration are available The Commissioning Wizard guides through the different steps and launches the configuration tool Local Project For the
30. tion with software products devices or components from other manufacturers which have been approved or recommended by Siemens Before you use the supplied sample programs or programs you have written yourself make certain that no injury to persons nor damage to equipment can result in your plant or process Prior to Startup Step by Step Prior to startup please note the following warning Caution Prior to startup you must observe the notes in the relevant documentation For ordering data of the documentation please refer to catalogs or contact your local SIEMENS representative Ethernet Communication between OPC Server and S7 200 incl CP243 1 Preface Preface Purpose of the Manual This manual supports you when creating user programs and configurations in the OPC environment The activities involved in creating a program and the required configuration work are presented in the form of a sequential series of steps The configurations used are created with the basic software SIMATIC STEP 7 or NCM PC This manual serves as a reference work for configuration and communication with OPC components Aims This manual should help you to expand the components described and to integrate them in your program We assume that you are thoroughly familiar with your programs and development environment The Package This sample project consists of the following parts e Documentation commissioning documentation Excel e Microsoft
31. unction Diagram The following diagram shows the principle function of this example regarding a writing call to the PLC OPC Client OPC Server CP 243 1 7 200 Station eras ae y Prepare Write Request Call SyncWrite Pass to S7 Protocoll Call Put Data Buffer pass to PLC backplane Cyclic Call ETHO Return Put Update Cache Pass to OPC Return SyncWrite Evaluate Result gt gt Continue Figure 1 3 Function Diagram Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Overview and Environment 1 4 Required Software To run this example the following software packages are required Operating System e Microsoft Windows 2000 Professional SP3 or Windows XP Professional SP1 SIMATIC e SimaticNet CD 7 02 PC Software V6 0 for Windows 2000 or SimaticNet CD 7 02 PC Software V6 1 for Windows XP This software package includes drivers for the communication processor CP1613 and other Ethernet cards NIC das S7 Protocol and the S7 OPC Server including the OPC Scout e SIMATIC NOM S7 IE V5 2 or SIMATIC STEP 7 V5 2 This software package includes configuration software HWKonfig and NetPro with the required Hardware Catalog e SIMATIC STEP 7 MicroWin V3 2 SP1 This software package includes programming and configuration tool for S7 200 controllers Step by Step Ethernet Communication between OPC Server and S7 200 incl CP243 1 Overview and Environment 1 5 Required Hardw
Download Pdf Manuals
Related Search
Related Contents
Instructions for Use and Maintenance Istruzioni per l`uso e la Congratulations on your purchase of the Santa Monica 25 Algae Copyright © All rights reserved.
Failed to retrieve file