SIEMENS - simatic STEP 7 from S5 to S7

pdf
Số trang SIEMENS - simatic STEP 7 from S5 to S7 152 Cỡ tệp SIEMENS - simatic STEP 7 from S5 to S7 639 KB Lượt tải SIEMENS - simatic STEP 7 from S5 to S7 0 Lượt đọc SIEMENS - simatic STEP 7 from S5 to S7 2
Đánh giá SIEMENS - simatic STEP 7 from S5 to S7
4.2 ( 5 lượt)
Nhấn vào bên dưới để tải tài liệu
Đang xem trước 10 trên tổng 152 trang, để tải xuống xem đầy đủ hãy nhấn vào bên trên
Chủ đề liên quan

Nội dung

Preface, Contents Part 1: Planning Your Conversion Introduction 1 Hardware 2 Software 3 SIMATIC STEP 7 From S5 to S7 Part 2: Converting Programs Converter Manual Procedure 4 Preparing for Conversion 5 Conversion 6 Editing the Converted Program 7 Compiling 8 Application Example 9 Appendix This manual is part of the documentation package with the order number: 6ES7810-4CA07-8BW0 Address and Instruction Lists A Literature List B Glossary, Index Edition 01/2004 A5E00261402-01 ii Safety Guidelines ! ! ! 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, severe personal injury or substantial property damage will result if proper precautions are not taken. Warning indicates that death, severe personal injury or substantial property damage can result if proper precautions are not taken. Caution indicates that minor personal injury or property damage can result if proper precautions are not taken. Note draws your attention to particularly important information on the product, handling the product, or to a particular part of the documentation. Qualified Personnel The device/system may only be set up and operated in conjunction with this manual. Only qualified personnel should be allowed 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 ! Note the following: Warning 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. Trademarks SIMATIC, SIMATIC NET, and SIMATIC HMI 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. Copyright  Siemens AG 2004 All rights reserved Disclaimer of Liability 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 model or design, are reserved. We have checked the contents of this manual for agreement with the hardware and software 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 Bereich Automation and Drives Geschaeftsgebiet Industrial Automation Systems Postfach 4848, D-90327 Nuernberg Siemens Aktiengesellschaft  Siemens AG 2004 Subject to change without prior notice. A5E00261402-01 From S5 to S7, Converter Manual A5E00261402 01 Preface Purpose of the Manual This manual supports you when converting S5 programs into S7. With the information in this manual you can do the following: • Convert existing S5 programs into S7 programs and subsequently edit them manually if necessary. • Incorporate pre-converted S7 functions (previous S5 standard function blocks) into your S7 programs. Audience This manual is intended for programmers who wish to use existing S5 programs in S7. Where is this Manual Valid? This manual is valid for release 4.0 of the STEP 7 programming software. From S5 to S7, Converter Manual A5E00261402-01 iii Preface Where Does this Manual Fit in with the Rest of the S7 Documentation? There is a wide range of user documentation available to support you in configuring and programming an S7 programmable controller which is intended to be used selectively. The following explanations should make it easier for you to use the user documentation. This symbol indicates the order in which you should read the manuals, particularly if you are a first-time user of S7. Meaning Symbol This documentation introduces the methodology. This is a reference manual on a specific topic. The documentation is supported by online help. S7-300 Programmable Controller Quick Start Prime r /30/ Manual Manuals on S7-300/S7-400 Hardware System Software for S7-300/S7-400 Program Design Progr. Manual /234/ User Manual Standard Software for S7 and M7 STEP 7 /232/ Standard Software for From S5 to S7 S7-300/S7-400 /230/ /231/ STL Converter Manual LAD FBD /233/ /236/ SCL /250/ Reference Manual GRAPH for S7 /251/ HiGraph CFC for S7 /252/ /254/ /235/ System Software for S7-300/400 System and Standard Functions Language Packages /xxx/: Number in the list of references Figure 1-1 iv S7 Information Landscape From S5 to S7, Converter Manual A5E00261402-01 Preface Table 1-1 S7 Documentation Content Title Subject S7-300 Programmable Controller Quick Start, Primer The Primer offers a basic introduction to the methodology of the structure and programming of an S7-300/S7-400. It is especially suited to first-time users of an S7 programmable control system. S7-300 and S7-400 Program Design Programming Manual The S7-300/S7-400 Program Design Programming Manual provides basic information on the structure of the operating system and of a user program of an S7 CPU. The first-time user of an S7-300 or S7-400 should use this manual to acquire an overview of the programming methodology and to use it to base their user program design on. S7-300 and S7-400 System and Standard Functions Reference Manual The S7 CPUs have integrated system functions and organization blocks included with their operating system, which you can use when programming. The manual provides you with an overview of the system functions, organization blocks, and loadable standard functions available in S7, and – in the form of reference information – detailed interface descriptions for their use in your user program. STEP 7 User Manual The STEP 7 User Manual explains the main usage and the functions of the STEP 7 automation software. As a first-time user of STEP 7 and as an experienced user of STEP 5, this manual will provide you with an overview of the procedures used to configure, program, and start up an S7-300/S7-400. While you are working with the software you can access a range of online help topics which offer detailed support on using the software. Converter Manual From S5 to S7 You will need the From S5 to S7 Converter Manual if you want to convert existing S5 programs to run them on S7 CPUs. The manual provides an overview of the procedures and usage of the Converter; you can find a detailed description of the converter functions in the online help. You will also find the interface descriptions for the converted S7 functions available in the online help. Practical information is also provided on SIMATIC S7 hardware and software. Statement List, Ladder Logic, Function Block Diagram, SCL1 Manuals The manuals for the programming language packages Statement List, Ladder Logic, Function Block Diagram, and SCL (Sequential Control Language) contain both the user’s guide and the reference description of the programming language or representation type. You only require one language type for programming an S7-300/S7-400, but you can mix the languages within a project, if required. If you are using a language for the first time, it is recommended that you use the manual to learn about the methodology of creating a program in the chosen language first. While you are working with the software you can access a range of online help topics which offer detailed support on using the respective editors/compilers. GRAPH1 , HiGraph1, CFC1 Manuals The languages GRAPH, HiGraph, and CFC (Continuous Function Chart) offer additional methods of programming blocks in the form of sequential controls, state graphs, or charts. The manuals contain both the user’s guide and the reference description of the programming language. If you are using a language for the first time, it is recommended that you use the manual to learn about the methodology of creating a program in the chosen language first. While you are working with the software you can access a range of online help topics which offer detailed support on using the respective editors/compilers (with the exception of HiGraph). 1 Optional package for system software for S7-300/S7-400 From S5 to S7, Converter Manual A5E00261402-01 v Preface Structure of the Manual This manual assumes you have knowledge of S7 programs which you can read about in the Programming Manual /234/. You should also be familiar with using the Standard software, as described in the User Manual /231/. The manual is divided according to the following topic areas: • Part 1 (Chapters 1 to 3) explains how to plan your conversion from S5 to S7. • Part 2 (Chapters 4 to 9) explains how to convert programs with the converter. • Chapter 9 contains application examples. • The Appendix is a reference section on all STL instructions (international and German mnemonics) provided for reference purposes. • The Glossary explains important terms. • The Index will help you to locate text passages on important subjects quickly and easily. Conventions References to other manuals are shown using the part number of the literature between slashes /.../. Using these numbers you can find out the exact title of the manual from the literature list at the end of this manual. Additional Assistance If you have any questions regarding the software described in this manual and cannot find an answer here or in the online help, please contact the Siemens representative in your area. You will find a list of addresses in the Appendix of /70/ or /100/, or in catalogs, and in Compuserve (go autforum). You can also speak to our Hotline under the following phone or fax number: Tel. (+49) (911) 895 7000 (Fax 7001) If you have any questions or comments on this manual, please fill out the remarks form at the end of the manual and return it to the address shown on the form. We would be grateful if you could also take the time to answer the five questions giving your personal opinion of the manual. Siemens also offers a number of training courses to introduce you to the SIMATIC S7 automation system. Please contact your regional training center or the central training center in Nuremberg, Germany for details: D-90327 Nuremberg, Tel. (+49) (911) 895-3154. Notes vi This manual replaces the older “Converting S5 Programs” User Manual. In other manuals, this manual may still be referred to under its old name or simply as the Converter Manual. From S5 to S7, Converter Manual A5E00261402-01 Contents 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 2 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 2.1 Programmable Logic Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 S7 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Central Processing Units (CPU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Power Supply Modules (PS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Interface Modules (IM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Communications Processors (CP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Modules (FM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Signal Modules (SM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simulation Modules (S7-300) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 2-6 2-8 2-9 2-10 2-13 2-15 2-16 2.3 Distributed I/O Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17 2.4 2.4.1 Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Interface to User Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18 2-20 2.5 Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 3.1 3.1.1 3.1.2 3.1.3 General Operating Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installation Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing STEP 7 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starting STEP 7 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 3-1 3-2 3-3 3.2 Structure of an S7 Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 3.3 3.3.1 3.3.2 Editing Projects with the SIMATIC Manager . . . . . . . . . . . . . . . . . . . . . . . . . Creating Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Storing Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7 3-7 3-8 3.4 Configuring Hardware with STEP 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9 3.5 Configuring Connections in the Connection Table . . . . . . . . . . . . . . . . . . . . 3-11 3.6 3.6.1 3.6.2 Inserting and Editing a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basic Procedure for Creating Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Inserting Components for Creating Software in S7 and M7 Programs . . . 3-13 3-13 3-15 3.7 3.7.1 3.7.2 3.7.3 3.7.4 3.7.5 3.7.6 Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Functions and Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Organization Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Block Representation during Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17 3-17 3-18 3-18 3-19 3-20 3-24 3 From S5 to S7, Converter Manual A5E00261402-01 vii Contents 4 5 6 7 viii 3.8 System Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26 3.9 3.9.1 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 Standard Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Floating-Point Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Signal Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Integrated Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Analog Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Math Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28 3-28 3-28 3-28 3-29 3-29 3-29 3.10 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30 3.11 3.11.1 3.11.2 Address Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . New Addresses in S7: Local Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-32 3-32 3-33 3.12 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-35 3.13 3.13.1 3.13.2 3.13.3 3.13.4 Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Absolute Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Symbolic Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . New Feature: Complete Addressing of Data Addresses . . . . . . . . . . . . . . . Indirect Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-39 3-39 3-39 3-41 3-43 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 4.1 Analyzing the S5 System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 4.2 Creating an S7 Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 4.3 Configuring Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 Preparing for Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 5.1 Providing the Required Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 5.2 Checking Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3 5.3 Preparing the S5 Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4 5.4 5.4.1 5.4.2 5.4.3 Creating Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Instruction Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . OB Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Editing Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5 5-6 5-7 5-8 Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 6.1 Starting the Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 6.2 Generated Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5 6.3 Interpreting Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8 Editing the Converted Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1 7.1 7.1.1 Address Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Options for Changing Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 7-2 7.2 Non-Convertible Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 7.3 Indirect Addressing – Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4 7.4 Working with Direct Memory Accesses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5 From S5 to S7, Converter Manual A5E00261402-01 Contents 7.5 Assigning Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5 7.6 Standard Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6 8 Compiling the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1 9 Application Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1 9.1 Analog Value Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2 9.2 Temporary Local Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5 9.3 Evaluating the Start Information from the Diagnostic Interrupt OB (OB82) 9-8 9.4 Block Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11 9.5 Calling the Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-14 Address and Instruction Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1 A.1 Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1 A.2 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3 Literature List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1 A B Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index .......................................................... From S5 to S7, Converter Manual A5E00261402-01 Glossary-1 Index-1 ix Contents x From S5 to S7, Converter Manual A5E00261402-01
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.