Programmable Logic Controllers
Programmable Logic Controllers
Controllers:
An Emphasis on Design and Application
Second Edition
Kelvin T. Erickson
Missouri University of Science and Technology
Dogwood
Valley
Press, LLC
Copyright © 2011 Dogwood Valley Press, LLC. All rights reserved.
No portion of this book may be reproduced, stored in a retrieval system, or transmitted in
any form or by any means, including electronic, mechanical, photocopying, scanning,
recording or otherwise, except as permitted under the 1976 United States Copyright Act,
without explicit, prior written permission of the publisher except for brief passages
excerpted for review and critical purposes.
This book was set in Times New Roman and printed on acid-free paper.
Glossary 1457
Index 1473
PREFACE
The field of automatic control has been undergoing a transformation over the past
twenty years. Twenty years ago, the engineering undergraduate had a course in feedback
control theory and those interested in control engineering secured a position in the
aerospace or chemical industries. Due to various factors, the number of control engineering
positions in the aerospace industry has been declining, but the number of control
engineering positions in manufacturing has been dramatically increasing to the point that
the majority of control engineering positions is now in manufacturing and involves PLCs.
This book presents the subject of programming industrial controllers, called
programmable logic controllers (PLCs) with an emphasis on the design of the programs.
Many texts teach one how to program the PLC in its languages, but little, if any, attention is
paid to how does one attack the problem: “Given a set of operational specifications, how
does one develop the PLC program?” This book develops the design process: the tasks
involved, breaking the program into manageable pieces, standard code for the various parts,
and handling the sequential parts of the problem. The emphasis is toward those who will be
programming PLCs.
Because of its popularity (now and in the future), ladder logic is the language that is
used for the majority of the text. The industry trend is toward using the IEC 61131-3
(formerly IEC 1131-3) standard, and so it is the primary language. However, IEC 61131-3
is only a voluntary standard and individual manufacturers have some freedom in the
implementation. Therefore, the Allen-Bradley ControlLogix, Modicon, Siemens S7, and
GE implementations of the 61131-3 standard are covered. Because of their large installed
base, the Allen-Bradley PLC-5/SLC-500 PLC languages are also covered.
Due to the limitations of ladder logic, the IEC 61131-3 standard defines four other
languages: function block diagram, structured text, instruction list, and sequential function
chart. These four languages will become more popular in the future. Therefore, this text also
covers these languages.
Since a typical manufacturing plant may contain discrete, continuous, and batch
processes, all of these applications are treated in this text, although the emphasis is on
discrete and continuous processes. The emphasis is on a methodology that can be applied to
any automation project, regardless of the size.
Throughout, the book contains example problems demonstrating good design practice.
In addition, these problems are solved with each PLC covered in the book. The text
culminates in two full-length case studies where the application of the design techniques to
a large problem is illustrated.
This book takes a practical approach to the design of PLC control systems. Some
mathematical theory is used to backup the presentation on PID controllers. However, the
theory is not detailed and can be omitted.
Except for Chapters 1 and 13, every chapter begins with a scenario that reflects the
experience of the author and his colleagues in the challenging world of factory automation.
vii
viii Preface
These scenarios present a small problem and the solution and are intended to illustrate
troubleshooting techniques.
Objectives
The main objectives of this text are to teach:
• PLC programming languages (with emphasis on IEC 61131-3)
• Approach to sequential problems
• Good program design practice
• Simple PID control tuning
• Introduction to sensors and actuators
• Factory communications
• Human-machine interface (HMI) concepts
Content Overview
The book starts by introducing programmable logic controllers (PLCs) and their
distinguishing characteristics. Chapters 2 – 5 cover basic ladder logic programming:
contact, timer, and counter instructions. As part of the basics, the memory structure of the
five particular PLCs and installation topics are treated. Chapter 6 covers ladder logic
program design for sequential applications, probably the most significant contribution of
the text. Chapters 7 and 8 treat computation, comparison, and advanced ladder logic
instructions. Alternate sequential implementations in ladder logic are covered in Chapter 9
and PID controller tuning is covered in Chapter 10. Chapters 11 – 14 cover the other four
IEC programming languages: function block diagram, statement list, instruction list, and
sequential function chart. PLC troubleshooting is covered in Chapter 15. Sensors and
actuators appear in Chapter 16. Chapter 17 introduces factory communication networks.
Operator interface, often called human-machine interface (HMI), issues are treated in
Chapter 18. Control system security is addressed in Chapter 19 and PLC selection is
introduced in Chapter 20. Chapter 21 presents the perspective of an entire automation
project, bringing together the various pieces of PLC control design. Chapter 22 outlines two
full-length project case studies. One case study is for a process that is primarily discrete and
the other case study is for a process that is primarily continuous in nature. Details about
number systems and drawing symbols are included as appendices, rather than interrupt the
flow of the text material.
The Audience
This book primarily serves the academic market, at the junior or senior undergraduate
electrical, mechanical, or industrial engineering or engineering technology level. This text
is also suitable for the two-year technical school market. There is nothing in the material
that requires a college degree, though the material will be more challenging than the typical
PLC textbook for this level of student.
In addition, this text serves the professional market. Economic and regulatory pressures
in the manufacturing, chemical, petrochemical, pharmaceutical, and food industries have
forced control engineers to design new systems or retrofit existing control systems. Hence,
there are many control engineers (primarily chemical and electrical) who need to rapidly
Preface ix
educate themselves in an area of technology in which they are probably only somewhat
familiar. This book is valuable to this audience.
Second Edition
The second edition primarily updates the Modicon, Siemens, and GE controllers to the
current processors, but there are other changes throughout. The Modicon sections focus on
the Modicon Unity processors. For the older Modicon Quantum/Momentum processors,
see the first edition of this text. The Allen-Bradley material has been updated to focus on the
ControlLogix processor, though the PLC-5/SLC-500/MicroLogix processors are also
covered. Coverage of the ControlLogix add-on instruction (AOI) has been added. The
Siemens S7-1200 has been added to the Siemens sections and the material on the
S5-compatible timers and counters has been removed. The GE PACSystems processor has
been added and the material focuses on this processor with references to the earlier
processors as appropriate. The PLC history in Chapter 1 has been updated. In Chapter 2, the
section about converting relay logic to ladder logic has been removed and replaced with a
section on using the transitional contacts and coils. The examples in sections 9.2, 11.7 and
21.4 now utilize user-defined data types and user-defined function blocks. In addition, all of
the chapter problems have been replaced with new problems. Lastly, the accompanying CD
contains the PLC projects for each example problem and has an additional set of solved
problems.
Acknowledgements
The author wishes to acknowledge the beneficial suggestions and comments of many
colleagues. Steve Ingracia provided the sample panel specification in Chapter 4. Bill
Bichler, Dean Ford, and Esther Erickson reviewed drafts of the first edition of this book and
provided many suggestions and corrections to improve the final product. Ken Ball provided
more information on the history of the PLC and John Crabtree provided helpful suggestions
for the second edition. I especially thank Esther and Fran Erickson for correcting the entire
manuscript for grammatical errors, and Fran for doing the initial typesetting.
Portions of this material were taught in industrial short courses and university courses
and the students are acknowledged for their help in pointing out errors in the text and where
the presentation was unclear.
The following are trademarks or registered trademarks of Schneider Electric: 984,
BP85, Concept, FactoryCast, M340, Modbus, Modbus Plus, Modicon, Momentum, PL7,
Preventa, Quantum, TSX Micro, Twido, and Unity. The following are trademarks or
registered trademarks of Rockwell Automation and its various subsidiaries: Allen-Bradley,
CompactLogix, ControlLogix, Data Highway Plus, DH+, FlexLogix, Guard I/O,
GuardPLC, MicroLogix, Logix 5000, Pico, PLC-2, PLC-3, PLC-5, PLC-5/11, -5/12, -5/20,
-5/20C, -5/20E, -5/26, -5/40E, -5/46, -5/80E, -5/86, Point I/O, Rockwell Automation,
Rockwell Software, RSLinx, RSLogix 5, RSLogix 500, RSLogix 5000, RSNetWorx, SLC,
SLC-500 and SoftLogix. SIMATIC is a registered trademark of Siemens AG. The
following are trademarks of GE Intelligent Plarforms: CIMPLICITY, Logicmaster,
PACSystems, Series 90, VersaMax, and VersaPro. Foundation is a trademark of Fieldbus
Foundation. ControlNet is a trademark of ControlNet International, Ltd. DeviceNet is a
trademark of the Open DeviceNet Vendors Association (ODVA). PROFIBUS and
PROFInet are registered trademarks of Profibus Nutzerorganisation, e.V. P-NET is a
x Preface
Disclaimer
Information furnished herein is believed to be accurate and reliable; however no
responsibility is assumed for any errors. The user assumes full responsibility for the
accuracy and appropriateness of this information.