ebook img

PLC Programming In Instruction List According To IEC 61131-3: A Systematic And Action-Oriented Introduction In Structured Programming PDF

245 Pages·2022·8.881 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview PLC Programming In Instruction List According To IEC 61131-3: A Systematic And Action-Oriented Introduction In Structured Programming

Hans-Joachim Adam · Mathias Adam PLC Programming In Instruction List According To IEC 61131-3 A Systematic And Action-Oriented Introduction In Structured Programming PLC Programming In Instruction List According To IEC 61131-3 Hans-Joachim Adam • Mathias Adam PLC Programming In Instruction List According To IEC 61131-3 A Systematic And Action-Oriented Introduction In Structured Programming Hans-Joachim Adam Mathias Adam Bühl, Germany Bühl, Germany ISBN 978-3-662-65253-4 ISBN 978-3-662-65254-1 (eBook) https://doi.org/10.1007/978-3-662-65254-1 © The Editor(s) (if applicable) and The Author(s), under exclusive licence to Springer-Verlag GmbH, DE, part of Springer Nature 2022, 2015 Originally published by Elektorverlag, Aachen, 1997, 2000, 2003 This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. This Springer imprint is published by the registered company Springer-Verlag GmbH, DE, part of Springer Nature. The registered company address is: Heidelberger Platz 3, 14197 Berlin, Germany Preface to the Fourth Edition (german) This book is the result of teaching practice at vocational and general schools, in-house training and further education in a chemical company and the professional qualification of engineers to teach information technology at vocational schools in Baden-Württemberg (Germany). The book is written as a textbook and exercise book. This means that you will be intro- duced to new areas through explanation or examples. To consolidate your knowledge and to check your learning and success, we recommend that you do the exercises. Sample solutions are available for most exercises: Each exercise has a unique name under which the solution can be found on the authors’1 website. An integral part of this book is the PLC simulation software “PLC-lite”, which was developed by the authors especially for this course. You can download it free of charge from the authors’ website. This gives you the opportunity to intensively test a control sys- tem that conforms to the standards, regardless of limitations with real systems. The scope of commands, data types, structures, etc. has been selected in such a way that the special features of programming in instruction lists according to IEC 61131-3 can be easily under- stood using the exercises from this book. In addition, “PLC-lite” contains a large number of processes as animated simulations. This allows you to test your programs in a practical and safe manner and to study the behavior of the controlled processes (even under extreme conditions or “errors”). Your PC is thus both a programming device and PLC automation device as well as a “technical system”. At the beginning we will deal in detail with basics and digital technology in the first four chapters. This part serves primarily as preparation for PLC programming, which is covered in the second part. You will learn important basics for PLC technology here. In addition, digital technology is already PLC programming! In principle, nothing else is done in the “function block diagram” language than connecting the logical symbols to form the program. This looks very similar to creating a digital circuit. 1 www.adamis.de/plc/ v vi Preface to the Fourth Edition (german) In the second part of the book we cover PLC technology. You will now quickly see the advantage of PLC programming: Changes don’t require cumbersome cable pulling, as was necessary with digital circuitry. You simply write the new instruction and that’s it. In this book, programming is learned with the most universal language, the instruction list (IL). Compared to the often more popular graphical languages, it has the advantage of an exact, easily comprehensible and clear structure. With the second edition, IEC 61131–3 is even more consistently oriented towards general programming languages. With the book “SPS Programmierung mit IEC 61131” (“PLC Programming with IEC 61131”) Karl Heinz John and Michael Tiegelkamp have created a reference that provides deep insights into the IEC 61131 standard. With this reference work, the fundamentals laid in this book can be systematically expanded. Because this book is a textbook (and not a reference book), it is advisable to work through the book systematically. The subject matter and the exercises are arranged accord- ing to didactic aspects in a very specific order, building on each other. Please do not skip any of the exercises and only continue working when you have fully understood them, so that any gaps do not become noticeable later in a negative way. The step-by-step procedure guarantees the highest possible learning success. To work through it, we recommend one of the following three methods: The You work through everything in sequence, chronologically from the first page to thorough the last. If you take the time and have the patience to work through the more than method 150 exercises, you will gain solid knowledge in both digital technology and PLC that goes far beyond simple basics. Especially if you have no prior knowledge of digital technology, this is the recommended approach. You will then learn digital technology first and then PLC technology The Alternatively, you can also learn digital technology and PLC technology at the parallel same time by alternating between a chapter on digital technology and the method corresponding PLC chapter. We recommend this procedure if you already know some digital technology, but are no longer completely sure. In this case, work through the chapters in the following order: 1, 2, 5, 3, 6, 7, 4, 8, 9, 10, 11, 12 The If you are a digital technology “pro” and want to deal exclusively with PLC advanced technology, you can simply start with the fifth chapter and then continue to the end method of the book Since the first edition of this book more than 13 years ago, the IEC 61131 standard has gained enormously in importance. The currently valid second edition of the standard brought numerous changes and additions, which have been taken into account in this fourth edition of the book. The flowchart illustrations in this book have been redrawn in accordance with DIN EN 60848. Bühl, Germany Hans-Joachim Adam S pring 2012 Mathias Adam Preface to the Fifth, Expanded Edition We have added another chapter to the book in which the control of a mountain railway is programmed. Of particular interest here is the visualization of the mountain railway in the newly designed PLC-lite simulation application. This allows you to run the cable car “properly” and test your programs realistically and safely. By simulating operating errors (interrupted or short-circuited sensor) you can test the stability of your solutions. Furthermore, we have extended the subject index by a listing of the exercise tasks. Bühl, Germany Hans-Joachim Adam S pring 2015 Mathias Adam vii Contents Part I Digital Technology 1 Basics: Number Systems, Dual Numbers and Codes 3 1.1 Decimal Number System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Bundling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 The Decimal Position System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 Roman Numerals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.5 Egyptian Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.6 Binary System, Dual Number System . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.7 Computers Work with Dual Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.8 Conversion of Decimal Numbers into Dual Numbers . . . . . . . . . . . . . . . 10 1.9 Other Number Bases, Hexadecimal Numbers (Base 16) . . . . . . . . . . . . . 11 1.10 Hexadecimal Numbers and Dual Numbers . . . . . . . . . . . . . . . . . . . . . . . . 12 1.11 Binary Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.12 BCD Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.13 ASCII Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.14 Dual Code – Dual Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.15 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2 Logical Functions and Boolean Algebra 17 2.1 Negation (NOT Function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.2 Identity (EQUAL Function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.3 Conjunction (AND Function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.4 Heating Control (Two-Point Control) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.5 Negation of the Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.6 More Than Two Input Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.7 AND Operation as Data Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.8 Disjunction (OR Function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.9 OR Operation as Data Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.10 NAND Function (Negation of the AND Function) . . . . . . . . . . . . . . . . . . 24 2.11 NOR Function (Negation of the OR Function) . . . . . . . . . . . . . . . . . . . . . 24 ix x Contents 2.12 C reating a Function from the Function Table . . . . . . . . . . . . . . . . . . . . . . 26 2.13 EXOR Function (Antivalence) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.14 Disjunctive Normal Form (AND-Before-OR), Minterms . . . . . . . . . . . . 28 2.15 Brief Description of the Logic Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.16 Two-Way Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.17 Creating the Function Equation with More Than Two Inputs . . . . . . . . . 31 2.18 Cross Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.19 Two- from Three-Sensors Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.20 Transforming and Simplifying Functions . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.21 Boolean Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.22 Conjunctive Normal Form (OR-Before-AND) . . . . . . . . . . . . . . . . . . . . . 36 3 Memory Elements 39 3.1 Flip-Flops and Static Memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.2 The RS Flip-Flop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.3 Alarm Circuit 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.4 Defined Basic Position (Preferred Position) . . . . . . . . . . . . . . . . . . . . . . . 43 3.5 Priority of the Input Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 3.6 Motor Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 3.7 Flip-Flop with Negated Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.8 Clock-State Controlled Flip-Flops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 3.9 Alarm Circuit 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 3.10 Filling and Emptying a Measuring Vessel . . . . . . . . . . . . . . . . . . . . . . . . 49 3.11 Alarm Circuit 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4 Dynamic Memory Elements and Counters 53 4.1 Clock Edge Controlled Flip-Flops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 4.2 RS Bistable Element with Dynamic Input . . . . . . . . . . . . . . . . . . . . . . . . 55 4.3 The JK-Flip-Flop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 4.4 The T-Flip-Flop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 4.5 Automatic Filling and Emptying of a Measuring Vessel . . . . . . . . . . . . . 58 4.6 Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 4.6.1 The Asynchronous Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 4.6.2 The Asynchronous Down Counter . . . . . . . . . . . . . . . . . . . . . . . . 62 4.6.3 Modulo-n, Decimal- and BCD-Counters . . . . . . . . . . . . . . . . . . . 62 4.6.4 Modulo-3 Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4.6.5 BCD Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4.6.6 Counter with Any Start and End Value . . . . . . . . . . . . . . . . . . . . 64 4.7 Multiple Filling and Emptying of a Vessel . . . . . . . . . . . . . . . . . . . . . . . . 65 4.8 Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Contents xi Part II PLC Technology 5 Combinatorial Circuits with PLC 69 5.1 Directly Represented Variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 5.2 Basic Logical Links with PLCs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 5.3 OR Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 5.4 The Current Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 5.5 The PLC Simulation Application “PLC-Lite” . . . . . . . . . . . . . . . . . . . . . 74 5.6 AND Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 5.7 Negation of Inputs and Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 5.8 Boolean Algebra: De Morgan’s Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 5.9 Boiler Heating (Two-Point Control) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 5.10 Program Cycle of the PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 5.11 Circuit Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 5.12 Querying Output Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 5.13 Flags and Brackets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 5.14 Memory for Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 5.15 Comments in the Instruction List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 5.16 Intermediate Results in Brackets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 5.17 EXOR Operation (Antivalence) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 6 Logical Memory Circuits 89 6.1 Output with Self-Retaining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 6.2 Setting and Resetting Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 6.3 Order of Execution and Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 6.4 Storage of Inputs and Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 6.5 Process Images of the Inputs and Outputs . . . . . . . . . . . . . . . . . . . . . . . . 96 6.6 Level Control of a Vessel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 6.7 Alarm Circuit 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 6.8 Signal Memories as Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 6.9 Use of Function Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 6.10 Control for Filling and Emptying a Measuring Vessel . . . . . . . . . . . . . . . 104 7 Timers with PLC 107 7.1 Timer for Pulses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 7.2 Filling and Emptying with Time Control . . . . . . . . . . . . . . . . . . . . . . . . . 110 7.3 Flashing Lights and Oscillating Circuits. . . . . . . . . . . . . . . . . . . . . . . . . . 111 7.4 Alarm Circuit 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 7.5 Using Multiple Timers: Chasers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 7.6 Timer with Switch-On Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 7.7 Start/Stop Oscillator with only One Timing Element . . . . . . . . . . . . . . . . 117 7.8 Note on the Display of Very Short Pulses . . . . . . . . . . . . . . . . . . . . . . . . . 119

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.