1 2 3 4 5 6 7 8 9 10 11 12 13 S5-155U Cpu 948 Simatic S5
Total Page:16
File Type:pdf, Size:1020Kb
Contents Introduction 1 SIMATIC S5 User Program 2 S5-155U Program Execution 3 CPU 948 Operating Statuses and Program Execution Levels 4 Programming Guide Interrupt and Error Diagnostics 5 This manual has the order number: Integrated Special Functions 6 6ES5 998–3PR21 Extended Data Block DX 0 7 Memory Assignment and Memory Organization 8 Memory Access Using Absolute Addresses 9 Multiprocessor Mode and Com- munication in the S5-155U 10 PG Interfaces and Functions 11 Appendix 12 Indexes: Abbreviations Key Words 13 The List of Operations, order no. 6ES5 997-3UA22, is included with this manual. 10/98 C79000-G8576-C848 Release 04 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 accor- dance 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 ap- proved 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 SIMATICR, SIMATIC NETR and SIMATIC HMIR 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 E Siemens AG 1998 All rights reserved Disclaimer of Liability The reproduction, transmission or use of this document or its We have checked the contents of this manual for agreement with the contents is not permitted without express written authority. hardware and software described. Since deviations cannot be Offenders will be liable for damages. All rights, including rights precluded entirely, we cannot guarantee full agreement. However, created by patent grant or registration of a utility model or design, are the data in this manual are reviewed regularly and any necessary reserved. corrections included in subsequent editions. Suggestions for improvement are welcomed. Siemens AG Bereich Automatisierungs- und Antriebstechnik E Siemens AG 1998 Geschaeftsgebiet Industrie-Automatisierungssysteme Subject to change without prior notice. Postfach 4848, D-90327 Nuernberg Siemens Aktiengesellschaft 6ES5 998-3PR21 Contents 1 Introduction . 1 - 3 1.1 Area of Application for the S5-155U with the CPU 948 . 1 - 4 1.2 Typical Mode of Operation of a CPU . 1 - 5 1.3 The Programs in a CPU . 1 - 7 1.4 Which Operands are available to the User Program?. 1 - 11 1.5 How much Memory is available for the User Program? . 1 - 14 1.6 How to Tackle Programming. 1 - 15 1.7 Programming Tools . 1 - 18 1.8 Converting User Programs of the CPU 928B for the CPU 948. 1 - 19 2 User Program . 2 - 3 2.1 STEP 5 Programming Language . 2 - 4 2.1.1 The LAD, CSF, STL Methods of Representation. 2 - 4 2.1.2 Structured Programming . 2 - 5 2.1.3 STEP 5 Operations . 2 - 6 2.1.4 Number Representation . 2 - 8 2.1.5 STEP 5 Blocks and Storing them in Memory. 2 - 12 2.2 Program, Organization and Sequence Blocks . 2 - 16 2.2.1 Organization Blocks as User Interfaces . 2 - 18 2.2.2 Organization Blocks for Special Functions. 2 - 22 2.3 Function Blocks . 2 - 23 2.3.1 Structure of Function Blocks . 2 - 24 2.3.2 Programming Function Blocks . 2 - 26 2.3.3 Calling Function Blocks and Assigning Parameters to them . 2 - 28 2.3.4 Special Function Blocks. 2 - 33 2.4 Data Blocks . 2 - 35 2.4.1 Creating Data Blocks . 2 - 37 2.4.2 Opening Data Blocks . 2 - 38 2.4.3 Special Data Blocks . 2 - 41 CPU 948 Programming Guide C79000-G8576-C848-04 iii Contents 3 Program Execution. 3 - 3 3.1 Principle of Program Execution. 3 - 4 3.2 Program Organization . 3 - 5 3.3 Storing Program and Data Blocks . 3 - 10 3.4 Processing the User Program. 3 - 11 3.4.1 Definition of Terms used in Program Execution . 3 - 12 3.5 STEP 5 Operations with Examples . 3 - 15 3.5.1 Basic Operations . 3 - 19 3.5.2 Programming Examples in the STL, LAD and CSF Methods of Representation. 3 - 34 3.5.3 Supplementary Operations . 3 - 49 3.5.4 Executive Operations . 3 - 59 3.5.5 Semaphore Operations . 3 - 75 4 Operating Statuses and Program Execution Levels . 4 - 3 4.1 Program Execution Levels . 4 - 4 4.2 STOP Mode . 4 - 9 4.2.1 SOFT STOP . 4 - 9 4.2.2 HARD STOP . 4 - 13 4.2.3 OVERALL RESET . 4 - 14 4.3 START-UP Mode . 4 - 16 4.3.1 MANUAL and AUTOMATIC COLD RESTART . 4 - 17 4.3.2 MANUAL and AUTOMATIC WARM RESTART. 4 - 18 4.3.3 Comparison between COLD RESTART and WARM RESTART . 4 - 21 4.3.4 RETENTIVE COLD RESTART . 4 - 22 4.3.5 Comparison of COLD RESTART and RETENTIVE COLD RESTART . 4 - 23 4.3.6 User Interfaces for Start-Up. 4 - 24 4.3.7 Extended AUTOMATIC WARM RESTART with the CPU 948 (HOT RESTART). 4 - 27 4.3.8 Interruptions during START-UP . ..