SIEMENS - simatic function block diagram (FBD) for S7-300 and S7-400 programming

pdf
Số trang SIEMENS - simatic function block diagram (FBD) for S7-300 and S7-400 programming 206 Cỡ tệp SIEMENS - simatic function block diagram (FBD) for S7-300 and S7-400 programming 923 KB Lượt tải SIEMENS - simatic function block diagram (FBD) for S7-300 and S7-400 programming 0 Lượt đọc SIEMENS - simatic function block diagram (FBD) for S7-300 and S7-400 programming 10
Đánh giá SIEMENS - simatic function block diagram (FBD) for S7-300 and S7-400 programming
4.7 ( 19 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 206 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 Bit Logic Instructions 1 Comparison Instructions 2 Conversion Instructions 3 Function Block Diagram (FBD) for S7-300 and S7-400 Programming Counter Instructions 4 Data Block Instructions 5 Reference Manual Jump Instructions 6 Integer Math Instructions 7 Floating-point Math Instructions 8 Move Instructions 9 SIMATIC This manual is part of the documentation package with the order number: 6ES7810-4CA07-8BW1 Edition 01/2004 A5E00261409-01 Program Control Instructions 10 Shift and Rotate Instructions 11 Status Bit Instructions 12 Timer Instructions 13 Word Logic Instructions 14 Appendix Overview of All FBD Instructions A Programming Examples B Working with Function Block Diagram C Index Safety Guidelines This manual contains notices intended to ensure personal safety, as well as to protect the products and connected equipment against damage. These notices are highlighted by the symbols shown below and graded according to severity by the following texts: ! Danger ! Warning ! Caution indicates that death, severe personal injury or substantial property damage will result if proper precautions are not taken. indicates that death, severe personal injury or substantial property damage can result if proper precautions are not taken. indicates that minor personal injury can result if proper precautions are not taken. Caution indicates that property damage can result if proper precautions are not taken. Notice draws your attention to particularly important information on the product, handling the product, or to a particular part of the documentation. Qualified Personnel 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 HMI® and SIMATIC NET® 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 2004 Technical data subject to change. Siemens Aktiengesellschaft A5E00261409-01 Preface Purpose This manual is your guide to creating user programs in the Function Block Diagram (FBD) programming language. The manual also includes a reference section that describes the syntax and functions of the language elements of Function Block Diagram. Basic Knowledge Required The manual is intended for S7 programmers, operators, and maintenance/service personnel. In order to understand this manual, general knowledge of automation technology is required. In addition to, computer literacy and the knowledge of other working equipment similar to the PC (e.g. programming devices) under the operating systems MS Windows 2000 Professional or MS Windows XP Professional are required. Scope of the Manual This manual is valid for release 5.3 of the STEP 7 programming software package. Compliance with Standards FBD corresponds to the "Function Block Diagram" language defined in the International Electrotechnical Commission's standard IEC 1131-3. For further details, refer to the table of standards in the STEP 7 file NORM_TBL.WRI. Function Block Diagram (FBD) for S7-300 and S7-400 Programming A5E00261409-01 iii Preface Requirements To use the Function Block Diagram manual effectively, you should already be familiar with the theory behind S7 programs which is documented in the online help for STEP 7. The language packages also use the STEP 7 standard software, so you should be familiar with handling this software and have read the accompanying documentation. This manual is part of the documentation package "STEP 7 Reference". The following table displays an overview of the STEP 7 documentation: Documentation Purpose STEP 7 Basic Information with Basic information for technical 6ES7810-4CA07-8BW0 personnel describing the methods of implementing control tasks with STEP 7 and the S7-300/400 programmable controllers. • Working with STEP 7 V5.3, Getting Started Manual • Programming with STEP 7 V5.3 • Configuring Hardware and Communication Connections, STEP 7 V5.3 • From S5 to S7, Converter Manual STEP 7 Reference with Order Number Provides reference information and describes the programming languages LAD, FBD, and STL, and standard and system functions extending the scope of the STEP 7 basic information. 6ES7810-4CA07-8BW1 Online Helps Purpose Order Number Help on STEP 7 Basic information on Part of the STEP 7 programming and configuring Standard software. hardware with STEP 7 in the form of an online help. Reference helps on STL/LAD/FBD Reference help on SFBs/SFCs Reference help on Organization Blocks Context-sensitive reference information. • Ladder Logic (LAD)/Function Block Diagram (FBD)/Statement List (STL) for S7-300/400 manuals • Standard and System Functions for S7-300/400 iv Part of the STEP 7 Standard software. Function Block Diagram (FBD) for S7-300 and S7-400 Programming A5E00261409-01 Preface Online Help The manual is complemented by an online help which is integrated in the software. This online help is intended to provide you with detailed support when using the software. The help system is integrated in the software via a number of interfaces: • The context-sensitive help offers information on the current context, for example, an open dialog box or an active window. You can open the contextsensitive help via the menu command Help > Context-Sensitive Help, by pressing F1 or by using the question mark symbol in the toolbar. • You can call the general Help on STEP 7 using the menu command Help > Contents or the "Help on STEP 7" button in the context-sensitive help window. • You can call the glossary for all STEP 7 applications via the "Glossary" button. This manual is an extract from the "Help on Function Block Diagram". As the manual and the online help share an identical structure, it is easy to switch between the manual and the online help. Further Support If you have any technical questions, please get in touch with your Siemens representative or agent responsible. You will find your contact person at: http://www.siemens.com/automation/partner Training Centers Siemens offers a number of training courses to familiarize you with the SIMATIC S7 automation system. Please contact your regional training center or our central training center in D 90327 Nuremberg, Germany for details: Telephone: +49 (911) 895-3200. Internet: http://www.sitrain.com Function Block Diagram (FBD) for S7-300 and S7-400 Programming A5E00261409-01 v Preface A&D Technical Support Worldwide, available 24 hours a day: Nure mbe rg Be ijing Pe king Jo hns o n City Worldwide (Nuernberg) Technical Support 24 hours a day, 365 days a year Phone: +49 (180) 5050-222 Fax: +49 (180) 5050-223 E-Mail: adsupport@ siemens.com GMT: +1:00 Europe / Africa (Nuernberg) United States (Johnson City) Asia / Australia (Beijing) Authorization Technical Support and Authorization Technical Support and Authorization Local time: Mon.-Fri. 8:00 to 5:00 PM Local time: Mon.-Fri. 8:00 to 5:00 PM Local time: Mon.-Fri. 8:00 to 5:00 PM Phone: +49 (180) 5050-222 Phone: +1 (423) 262 2522 Phone: +86 10 64 75 75 75 Fax: +49 (180) 5050-223 Fax: +1 (423) 262 2289 Fax: +86 10 64 74 74 74 E-Mail: adsupport@ siemens.com E-Mail: simatic.hotline@ E-Mail: adsupport.asia@ GMT: +1:00 GMT: -5:00 GMT: +8:00 sea.siemens.com siemens.com The languages of the SIMATIC Hotlines and the authorization hotline are generally German and English. vi Function Block Diagram (FBD) for S7-300 and S7-400 Programming A5E00261409-01 Preface Service & Support on the Internet In addition to our documentation, we offer our Know-how online on the internet at: http://www.siemens.com/automation/service&support where you will find the following: • The newsletter, which constantly provides you with up-to-date information on your products. • The right documents via our Search function in Service & Support. • A forum, where users and experts from all over the world exchange their experiences. • Your local representative for Automation & Drives. • Information on field service, repairs, spare parts and more under "Services". Function Block Diagram (FBD) for S7-300 and S7-400 Programming A5E00261409-01 vii Preface viii Function Block Diagram (FBD) for S7-300 and S7-400 Programming A5E00261409-01 Contents 1 Bit Logic Instructions 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 2 3 Overview of Bit Logic Instructions .....................................................................1-1 >=1 : OR Logic Operation .................................................................................1-2 & : AND Logic Operation...................................................................................1-3 AND-before-OR Logic Operation and OR-before-AND Logic Operation..........1-4 XOR : Exclusive OR Logic Operation ...............................................................1-6 Insert Binary Input .............................................................................................1-7 Negate Binary Input ..........................................................................................1-8 = : Assign ..........................................................................................................1-9 # : Midline Output ............................................................................................1-10 R : Reset Output .............................................................................................1-12 S : Set Output..................................................................................................1-13 RS : Reset_Set Flip Flop.................................................................................1-14 SR : Set_Reset Flip Flop.................................................................................1-16 N : Negative RLO Edge Detection ..................................................................1-18 P : Positive RLO Edge Detection ....................................................................1-19 SAVE : Save RLO to BR Memory...................................................................1-20 NEG : Address Negative Edge Detection .......................................................1-21 POS : Address Positive Edge Detection .........................................................1-22 Comparison Instructions 2.1 2.2 2.3 2.4 2-1 Overview of Comparison Instructions ...............................................................2-1 CMP ? I : Compare Integer ...............................................................................2-2 CMP ? D : Compare Double Integer .................................................................2-3 CMP ? R : Compare Real .................................................................................2-4 Conversion Instructions 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15 3.16 1-1 3-1 Overview of Conversion Instructions ................................................................3-1 BCD_I : BCD to Integer.....................................................................................3-2 I_BCD : Integer to BCD.....................................................................................3-3 BCD_DI : BCD to Double Integer......................................................................3-4 I_DI : Integer to Double Integer.........................................................................3-5 DI_BCD : Double Integer to BCD......................................................................3-6 DI_R : Double Integer to Real ...........................................................................3-7 INV_I : Ones Complement Integer ....................................................................3-8 INV_DI : Ones Complement Double Integer.....................................................3-9 NEG_I : Twos Complement Integer ................................................................3-10 NEG_DI : Twos Complement Double Integer .................................................3-11 NEG_R : Negate Real Number .......................................................................3-12 ROUND : Round to Double Integer.................................................................3-13 TRUNC : Truncate Double Integer Part ..........................................................3-14 CEIL : Ceiling ..................................................................................................3-15 FLOOR : Floor.................................................................................................3-16 Function Block Diagram (FBD) for S7-300 and S7-400 Programming A5E00261409-01 ix Contents 4 Counter Instructions 4.1 4.2 4.3 4.4 4.5 4.6 4.7 5 6 8 9 x 8-1 Overview of Floating-Point Math .......................................................................8-1 Evaluating the Bits of the Status Word with Floating-Point Instructions ...........8-2 Basic Instructions ..............................................................................................8-3 ADD_R : Add Real ............................................................................................8-3 SUB_R : Subtract Real .....................................................................................8-4 MUL_R : Multiply Real ......................................................................................8-5 DIV_R : Divide Real ..........................................................................................8-6 ABS : Forming the Absolute Value of a Floating-Point Number .......................8-7 Extended Instructions........................................................................................8-8 SQR : Forming the Square of a Floating-Point Number ...................................8-8 SQRT : Forming the Square Root of a Floating-Point Number ........................8-9 EXP : Forming the Exponential Value of a Floating-Point Number ................8-10 LN : Forming the Natural Logarithm of a Floating-Point Number ...................8-11 Forming Trigonometric Functions of Angles as Floating-Point Numbers .......8-12 Move Instructions 9.1 7-1 Overview of Integer Math Instructions ..............................................................7-1 Evaluating the Bits of the Status Word with Integer Math Instructions .............7-2 ADD_I : Add Integer ..........................................................................................7-3 SUB_I : Subtract Integer ...................................................................................7-4 MUL_I : Multiply Integer ....................................................................................7-5 DIV_I : Divide Integer ........................................................................................7-6 ADD_DI : Add Double Integer ...........................................................................7-7 SUB_DI : Subtract Double Integer ....................................................................7-8 MUL_DI : Multiply Double Integer .....................................................................7-9 DIV_DI : Divide Double Integer .......................................................................7-10 MOD_DI : Return Fraction Double Integer......................................................7-11 Floating-Point Math Instructions 8.1 8.2 8.3 8.3.1 8.3.2 8.3.3 8.3.4 8.3.5 8.4 8.4.1 8.4.2 8.4.3 8.4.4 8.4.5 6-1 Overview of Jump Instructions ..........................................................................6-1 JMP : Unconditional Jump in a Block................................................................6-2 JMP : Conditional Jump in a Block ...................................................................6-3 JMPN : Jump-If-Not...........................................................................................6-4 LABEL : Jump Label .........................................................................................6-5 Integer Math Instructions 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 7.10 7.11 5-1 OPN : Open Data Block ....................................................................................5-1 Jump Instructions 6.1 6.2 6.3 6.4 6.5 7 Overview of Counter Instructions ......................................................................4-1 S_CUD : Assign Parameters and Count Up/Down ...........................................4-3 S_CU : Assign Parameters and Count Up........................................................4-5 S_CD : Assign Parameters and Count Down ...................................................4-7 SC : Set Counter Value.....................................................................................4-9 CU : Up Counter..............................................................................................4-10 CD : Down Counter .........................................................................................4-11 Data Block Instructions 5.1 4-1 9-1 MOVE : Assign Value........................................................................................9-1 Function Block Diagram (FBD) for S7-300 and S7-400 Programming A5E00261409-01
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.