Table Of ContentFOURTH EDITION
Programmable
Logic Controllers
Hardware and Programming
Max Rabiee
FOURTH EDITION
Programmable
Logic Controllers
Hardware and Programming
Max Rabiee, PhD, PE/EE
Electrical Engineering Professor
Electrical and Computer Engineering Technology Program Chair
Electrical Engineering and Computing Systems (EECS) Department
University of Cincinnati
Publisher
The Goodheart-Willcox Company, Inc.
Tinley Park, IL
www.g-w.com
Copyright © 2018
by
The Goodheart-Willcox Company, Inc.
Previous editions copyright 2013, 2009, 2002
All rights reserved. No part of this work may be reproduced, stored, or
transmitted in any form or by any electronic or mechanical means, including
information storage and retrieval systems, without the prior written permission of
The Goodheart-Willcox Company, Inc.
Manufactured in the United States of America.
Library of Congress Catalog Card Number 2017004623
ISBN 978-1-63126-932-5
2 3 456789-18-2120 19
The Goodheart-Willcox Company, Inc. Brand Disclaimer: Brand names, company names, and illustrations for
products and services included in this text are provided for educational purposes only and do not represent or imply
endorsement or recommendation by the author or the publisher.
The Goodheart-Willcox Company, Inc. Safety Notice: The reader is expressly advised to carefully read,
understand, and apply all safety precautions and warnings described in this book or that might also be indicated
in undertaking the activities and exercises described herein to minimize risk of personal injury or injury to others.
Common sense and good judgment should also be exercised and applied to help avoid all potential hazards. The reader
should always refer to the appropriate manufacturer’s technical information, directions, and recommendations; then
proceed with care to follow specific equipment operating instructions. The reader should understand these notices and
cautions are not exhaustive.
The publisher makes no warranty or representation whatsoever, either expressed or implied, including but not limited
to equipment, procedures, and applications described or referred to herein, their quality, performance, merchantability,
or fitness for a particular purpose. The publisher assumes no responsibility for any changes, errors, or omissions in
this book. The publisher specifically disclaims any liability whatsoever, including any direct, indirect, incidental,
consequential, special, or exemplary damages resulting, in whole or in part, from the reader’s use or reliance upon the
information, instructions, procedures, warnings, cautions, applications, or other matter contained in this book. The
publisher assumes no responsibility for the activities of the reader.
The Goodheart-Willcox Company, Inc. Internet Disclaimer: The Internet resources and listings in this
Goodheart-Willcox Publisher product are provided solely as a convenience to you. These resources and listings were
reviewed at the time of publication to provide you with accurate, safe, and appropriate information. Goodheart-Willcox
Publisher has no control over the referenced websites and, due to the dynamic nature of the Internet, is not responsible
or liable for the content, products, or performance of links to other websites or resources. Goodheart-Willcox Publisher
makes no representation, either expressed or implied, regarding the content of these websites, and such references do
not constitute an endorsement or recommendation of the information or content presented. It is your responsibility to
take all protective measures to guard against inappropriate content, viruses, or other destructive elements.
Cover image: Operator screen used with permission of Rockwell Automation, Inc.;
background image momente/Shutterstock.com
Back cover image: photostock77/Shutterstock.com
Library of Congress Cataloging-in-Publication Data
Names: Rabiee, Max, author.
Title: Programmable logic controllers : hardware and programming / by Max Rabiee.
Description: Fourth edition. | Tinley Park, IL : The Goodheart-Willcox Company, Inc.,
[2018] | Includes index.
Identifiers: LCCN 2017004623 | ISBN 9781631269325
Subjects: LCSH: Programmable controllers.
Classification: LCC TJ223.P76 R34 2018 | DDC 629.8/95-dc23
LC record available at http://lccn.loc.gov/2017004623
Preface
Programmable Logic Controllers: Hardware and Programming is an
introductory text that explores many aspects of PLCs in an easy-to-understand
manner. The key concepts of PLCs are discussed using a comprehensive approach to
enhance learning. The text organization begins with basic concepts and progresses
to system level applications. Applications, testing procedures, and operational
aspects of PLC equipment and systems are discussed. This textbook emphasizes
the PLC’s practical use in industry.
The programmable logic controller was first introduced in the automotive
industry in the late 1960s. Today, PLCs are found throughout all manufacturing
industries and are increasingly found in commercial building automation systems.
Knowledge of selecting, wiring, and programming PLCs is required in many
career fields, including industrial controls, automation engineering, and
industrial maintenance.
This textbook describes the most common programmable logic controller
functions and provides examples using the Allen-Bradley Small Logic Controller
(SLC 500) series. There are a few software simulators for the SLC 500 for your
choosing. A quick web search can yield results from a variety of suppliers and
prices. The last chapter of the text discusses the next generation RSLogix 5000
software. PLC theory and PLC selection for various applications are explained.
PLC wiring and programming are also covered with numerous examples.
About the Author
Max Rabiee earned his PhD in electrical engineering from the University of
Kentucky. He has taught electrical engineering (EE) and electrical/computer
engineering technology (ECET) courses for over 25 years. Dr. Rabiee is a registered
professional engineer (since 1988) who worked as a control engineer for several
years. He was a senior electrical engineer for over four years in charge of medium
and large industrial control projects.
Dr. Rabiee is a member of the American Society of Engineering Education (ASEE),
the Institute of Electrical and Electronics Engineers (IEEE), the Association of
Technology, Management, and Applied Engineering (ATMAE), the Eta Kappa Nu
Electrical Engineering Honor Society, and the Tau Beta Pi Engineering Honor Society.
Reviewers
The author and publisher wish to thank the following industry and
teaching professionals for their valuable input into the development of
Programmable Logic Controllers.
Robert Schwien David Hartle
Moraine Valley Community College SUNY Canton
Palos Hills, Illinois Canton, New York
Robert DeBrecht Martin D. Keane, PE
Electrical Engineer United States Gypsum
Asheville, North Carolina Chicago, Illinois
Andrea Blaylock Jim Wilks
Triton College Mohawk College
River Grove, Illinois Hamilton, Ontario, Canada
Gholam H. Massiha Tom Lockett
University of Louisiana at Lafayette Vatterott College
Lafayette, Louisiana Quincy, Illinois
Wes Gubitz Keith Casey
Cape Fear Community College Wilkes Community College
Wilmington, North Carolina Wilkesboro, North Carolina
Acknowledgments
The author and publisher would like to thank the following companies,
organizations, and individuals for their contribution of resource material, images,
or other support in the development of Programmable Logic Controllers.
Rockwell Automation, Inc. Siemens
Logic Design, Inc., developers of Energy Concepts, Inc.
PLCLogix simulator software
In addition, the author and publisher wish to thank Bill Simpson of
The Learning Pit, developer of the LogixPro 500 PLC Simulator Software.
Many illustrations and examples found throughout this textbook were created
using this software. To learn more about this software, visit www.thelearningpit.com.
iv
G-W Integrated
Learning Solution
Together, We Build Careers
At Goodheart-Willcox, we take our mission seriously. Since 1921, G-W has been
serving the career and technical education (CTE) community. Our employee-owners
are driven to deliver exceptional learning solutions to CTE students to help prepare
them for careers. Our authors and subject matter experts have years of experience
in the classroom and industry. We combine their wisdom with our expertise to
create content and tools to help students achieve success. Our products start with
theory and applied content based upon a strong foundation of accepted standards
and curriculum. To that base, we add student-focused learning features and tools
designed to help students make connections between knowledge and skills.
G-W recognizes the crucial role instructors play in preparing students for careers.
We support educators’ efforts by providing time-saving tools that help them plan,
present, assess, and engage students with traditional and digital activities and
assets. We provide an entire program of learning in a variety of print, digital, and
online formats, including economic bundles, allowing educators to select the right
mix for their classroom.
Student-Focused Curated Content
Goodheart-Willcox believes that student-focused content should be built from
standards and accepted curriculum coverage. Programmable Logic Controllers
also uses a building block approach with attention devoted to a logical teaching
progression that helps students build upon their learning. Content is presented in
small, focused chapters to help students master concepts before moving on. We call
on industry experts and teachers from across the country to review and comment
on our content, presentation, and pedagogy. Finally, in our refinement of curated
content, our editors are immersed in content checking, securing and sometimes
creating figures that convey key information, and revising language and pedagogy.
v
Features of the Textbook
Features are student-focused learning tools designed to help you get the most out of your studies.
This visual guide highlights the features designed for the textbook.
CHAPTER Q
PLC Counter
Instructions
Chapter Outline previews the topics to be
learned in the chapter. Chapter Outline
4 Eumpte 5 21-
Technical Terms list the key terms to be
learned in the chapter.
Learning Objectives clearly identify the Technical Tenm
knowledge and skills to be obtained when
the chapter is completed. Learning Objectives
Introduction provides an overview and
preview of the chapter content.
Isntroduction
Examples describe real-world
PLC programming scenarios
and solutions.
Lab Activities at the end of select
chapters provide additional PLC
programming exercises.
LAB ACTIVITY □
Programming a PLC Station
Summary feature provides an additional
review tool for you and reinforces key
learning objectives.
Review Questions allow you to demonstrate
knowledge, identification, and comprehension
of chapter material.
vi
Student Resources
Textbook
The Programmable Logic Controllers textbook
provides an exciting, full-color, and highly illustrated
learning resource. The textbook is available in print
or online versions.
Lab Manual
The student Lab Manual provides hands-on practice to
be completed in the school lab setting under the guidance
of an instructor or trainer. Aligned to the textbook, the
Lab Manual enables students to demonstrate learning in
a very practical and thoroughly engaging manner.
Online Learning Suite
The Online Learning Suite provides the foundation of
instruction and learning for digital and blended class
rooms. An online student text and online
Lab Manual, along with rich supplemental content,
brings digital learning to the classroom. All
instructional materials are found on a convenient
online bookshelf and are accessible at home, at school, or
on the go.
Online Learning Suite/Student
Textbook Bundle
Looking for a blended solution? Goodheart-Willcox
offers the Online Learning Suite bundled with the
printed text in one easy-to-access package. Students
have the flexibility to use the print version, the
Online Learning Suite, or a combination of both
components to meet their individual learning style.
The convenient packaging makes managing and
accessing content easy and efficient.
vii
Instructor Resources
Instructor resources provide information and tools to support teaching, grading, and planning; class pre
sentations; and assessment.
Instructor's Presentations for PowerPoint®
Help teach and visually reinforce key concepts with prepared lectures. These presentations are
designed to allow for customization to meet daily teaching needs. They include objectives, outlines,
and images from the textbook.
ExamView® Assessment Suite
Quickly and easily prepare, print, and administer tests with the ExamView® Assessment Suite. With
hundreds of questions in the test bank corresponding to each chapter, you can choose which questions
to include in each test, create multiple versions of a single test, and automatically generate answer
keys. Existing questions may be modified and new questions may be added. You can prepare pretests,
formative assessments, and summative assessments easily with the ExamView® Assessment Suite.
Instructor's Resource CD
One resource provides instructors with time-saving preparation tools such as answer keys, lesson
plans, sample files, and other teaching aids.
Online Instructor Resources
Online Instructor Resources provide all
the support needed to make preparation
and classroom instruction easier than
ever. Available in one accessible location,
support materials include Answer Keys,
Lesson Plans, Instructor Presentations
for PowerPoint®, ExamView® Assessment
Suite, and more! Online Instructor
Resources are available as a subscription
and can be accessed at school or at home.
viii
Brief Contents
1 Programmable Logic Controller (PLC) Overview.....................2
2 PLC Selection, Components, and Communication...................18
3 Number Systems and Codes......................................................42
4 Input/Output Devices and Motor Controls...............................58
5 Creating Relay Logic Diagrams................................................80
6 PLC Programming.....................................................................90
7 Programming Logic Gate Functions in PLCs.......................126
8 PLC Timer Instructions............................................................164
9 PLC Counter Instructions..........................................................188
10 PLC Math Instructions.............................................................208
11 PLC Compare, Jump, and MCR Instructions........................224
12 PLC Subroutine Functions........................................................240
13 PLC Logic and Bit Shift Instructions.......................................254
14 Data Handling Instructions....................................................272
15 Sequencer Instructions............................................................292
16 Troubleshooting and Servicing the PLC System...................318
17 PLC Networks in Manufacturing...........................................332
18 PLC Programming with RSLogix 5000 Software.................362
ix