Xem mẫu

Ethernet Communication: Data Exchange S7-1200 <-> S7-1200 S7-1200 Configuration Example X17  February 2010 Applications & Tools Answers for industry. Warranty, liability and support Warranty, liability and support Note The application examples are not binding and do not claim to be complete regarding the circuits shown, equipping and any eventuality. The application examples do not represent customer-specific solutions. They are only intended to provide support for typical applications. You are responsible for ensuring that the described products are correctly used. These application examples do not relieve you of the responsibility of safely and professionally using, installing, operating and servicing equipment. When using these application examples, you recognize that we cannot be made liable for any damage/claims beyond the liability clause described. We reserve the right to make changes to these application examples at any time without prior notice. If there are any deviations between the recommendations provided in these application examples and other Siemens publications – e.g. Catalogs – then the contents of the other documents have priority. We do not accept any liability for the information contained in this document. Any claims against us – based on whatever legal reason – resulting from the use of the examples, information, programs, engineering and performance data etc. described in this application example shall be excluded. Such an exclusion shall not apply in the case of mandatory liability, e.g. under the German Product Liability Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life, body or health, guarantee for the quality of a product, fraudulent concealment of a deficiency or breach of a condition which goes to the root of the contract (“wesentliche Vertragspflichten”). However, claims arising from a breach of a condition which goes to the root of the contract shall be limited to the foreseeable damage which is intrinsic to the contract, unless caused by intent or gross negligence or based on mandatory liability for injury of life, body or health. The above provisions do not imply a change in the burden of proof to your detriment. It is not permissible to transfer or copy these application examples or excerpts of them without first having prior authorization from Siemens Industry Sector in writing. For questions about this document please use the following e-mail address: online-support.automation@siemens.com Ethernet Communication: Data Exchange S7-1200 <-> S7-1200 V1.1, ID Number: 39040038 2 Table of Contents Table of Contents Warranty, liability and support................................................................................... 2 1 Automation Problem............................................................................. 4 1.1 Tasks.................................................................................................... 4 Task A ........................................................................................ 4 Task B .................................................................................... 4 1.2 Communication versions...................................................................... 4 Automation solution A .......................................................................... 4 Automation solution B .......................................................................... 5 1.3 Demo setup.......................................................................................... 5 1.4 List of components............................................................................... 6 2 Automation Solution............................................................................. 7 2.1 Connection diagram............................................................................. 7 2.2 S7-1200 Ethernet communication........................................................ 7 Protocol versions.................................................................................. 7 2.2.1 Integrated connection management (task A)....................................... 8 2.2.2 Manual connection management (task B).......................................... 10 2.2.3 Block parameterization....................................................................... 11 Saving the output parameters............................................................ 13 2.3 Data transfer....................................................................................... 15 2.3.1 Absolute addressing........................................................................... 15 2.3.2 Symbolic addressing.......................................................................... 16 3 Configuration...................................................................................... 19 3.1 Installing and wiring the hardware (automation solution A+B)........... 19 3.2 Hardware / network configuration (automation solution A+B)............ 20 3.3 Ethernet communication with integrated connection management (automation solution A)...................................................................... 22 3.3.1 Sender side........................................................................................22 3.3.2 Receiver side......................................................................................23 3.3.3 Downloading the overall project......................................................... 25 3.3.4 Creating the Watch tables.................................................................. 26 3.3.5 Controlling communication blocks...................................................... 27 3.4 Ethernet communication with manual connection management (automation solution B)...................................................................... 30 3.4.1 TCON................................................................................................. 30 3.4.2 TSEND...............................................................................................31 3.4.3 TRCV..................................................................................................32 3.4.4 TDISCON........................................................................................... 33 3.4.5 Controlling communication blocks...................................................... 34 4 Code Elements................................................................................... 37 5 History................................................................................................37 Ethernet Communication: Data Exchange S7-1200 <-> S7-1200 V1.1, ID Number: 39040038 3 Automation Problem Tasks 1 Automation Problem 1.1 Tasks Data is to be transferred between two S7-1200 CPUs via Ethernet. The task is divided into the following two cases. Task A Independently of the data type, data with a fixed data length is to be transferred from one S7-1200 CPU (PLC 1) to another (PLC 2). Task B A dynamically changeable number of data elements is to be transferred from one array of an S7-1200 CPU (PLC 1) to another (PLC 2). 1.2 Communication versions For the data exchange, the S7-1200 offers the following T communication blocks:  TSEND_C and TRCV_C (with integrated connecting and disconnecting)  TCON, TSEND, TRCV and TDISCON (with manual connecting and disconnecting) The S7-1200 supports the following Ethernet protocols:  TCP native (RFC 793)  ISO-on-TCP (RFC 1006) The data can be transferred to the communication blocks with  absolute or  symbolic addressing. Automation solution A Using  the T communication blocks with integrated connection management (TSEND_C / TRCV_C)  via TCP,  2 bytes of absolutely addressed data are sent from PLC 1 and received with PLC 2. Ethernet Communication: Data Exchange S7-1200 <-> S7-1200 V1.1, ID Number: 39040038 4 Automation Problem Demo setup Automation solution B Using  the T communication blocks with manual connection management (TCON, TSEND, TRCV, TDISCON)  via ISO-on-TCP  1 array with 3 elements of symbolically addressed data is sent from PLC 1 and received with PLC 2. The S7-1200 compact controllers CPU 1214C are configured using the STEP7 Basic V10.5 programming user interface. The configuration is explained and the function is demonstrated by the startup code for each task. 1.3 Demo setup Figure 1-1 Power supply PLC 1 Switch PLC 2 1 2 3 4 5 STEP7 Basic V10.5 Figure 1-1 shows the basic configuration. The two communicating CPUs and the programming unit with the “STEP7 Basic V10.5” software are connected to the switch using Ethernet cables. For the list of components, please refer to chapter 1.4. Ethernet Communication: Data Exchange S7-1200 <-> S7-1200 V1.1, ID Number: 39040038 5 ... - tailieumienphi.vn
nguon tai.lieu . vn