Professional Documents
Culture Documents
PROGRAMMABLE LOGIC
CONTROLLERS
Second Edition
by
Gary Dunning
Production Editor:
Barbara L. Diaz
Acquisitions Editor:
Mark Huth
Channel Manager:
Mona Caron
Art/Design Coordinator:
Rachel Baker
Development:
Dawn Daugherty
Cover Design:
Cummings Advertising/Art, Inc
00-047578
TA B L E OF CON TE N TS
Preface
ix
Acknowledgments
xi
Part I
CHAPTER 1
Introduction to PLCs
.
.
.
.
.
.
.
.
.
4
5
6
8
8
9
11
16
23
31
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
57
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
33
33
37
39
44
45
46
50
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
58
63
68
71
73
77
77
78
88
88
iii
iv
TABLE OF CONTENTS
CHAPTER 4
Number Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
96
97
97
98
98
99
100
102
105
106
106
106
108
108
109
110
111
111
119
.
.
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
TABLE OF CONTENTS
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
160
162
164
165
165
166
167
168
169
170
Input Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
177
Input Modules . . . . . . . . . . . . . . . . . . . .
Discrete Input Module. . . . . . . . . . . . . . . .
Discrete AC Input Module . . . . . . . . . . . . .
AC Input Module Specifications. . . . . . . . . . .
DC Input Modules . . . . . . . . . . . . . . . . . .
Sinking and Sourcing. . . . . . . . . . . . . . . . .
DC Input Module Operation . . . . . . . . . . . .
DC Sinking Input Module Specifications . . . . . .
Solid-state Sensor Interface to DC Input Modules .
A Final Note on Sinking and Sourcing. . . . . . . .
Analog Inputs . . . . . . . . . . . . . . . . . . . . .
Specialty Modules . . . . . . . . . . . . . . . . . .
CHAPTER 8
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
178
180
180
183
189
190
194
195
198
200
200
208
Output Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
215
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
216
221
221
226
227
228
228
230
231
231
232
234
235
241
242
248
CHAPTER 9
.
.
.
.
.
.
.
.
.
.
.
.
.
vi
TABLE OF CONTENTS
Local Expansion . . . . . . . . . . . . .
Remote I/O Expansion . . . . . . . . . .
PLC Networking . . . . . . . . . . . . .
Selection and Placement of I/O Modules
Power Supply Selection . . . . . . . . .
I/O Racks and Expansion . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
248
249
251
251
253
263
275
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
276
276
279
281
283
285
287
288
292
292
295
295
297
298
299
301
308
310
318
327
328
330
339
347
Part II
PLC Instructions
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
348
348
349
350
352
354
TABLE OF CONTENTS
vii
356
359
359
Input Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
371
374
381
382
387
409
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
388
388
390
391
397
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Timer Instructions . . . . . . . . . .
SLC 500 Timers . . . . . . . . . . .
The On-delay Timer Instruction . . .
The Off-delay Timer Instruction. . .
The Retentive Timer Instruction . .
The Reset Instruction . . . . . . . .
PLC Counter Instructions . . . . . .
Allen-Bradley SLC 500 Counters . .
How Counters Work . . . . . . . . .
The Count-up Instruction . . . . . .
The Count-down Instruction . . . .
The High-speed Counter Instruction
The Counter Reset Instruction . . .
The Clear Instruction . . . . . . . .
Combining Timers and Counters . .
.
.
.
.
.
.
.
.
.
367
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
410
410
413
415
416
418
418
420
422
423
424
426
426
427
428
435
Comparison Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data-handling Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Logical Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
436
440
452
467
The Sequencer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sequencer Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
468
468
viii
TABLE OF CONTENTS
. . . . .
. . . . .
. . . . .
469
475
476
. . . . .
. . . . .
477
480
485
491
495
Glossary
Index
499
511
PRE FA CE
Welcome to the world of programmable logic controllers. Since their development in
the early 1970s, programmable logic controllers (PLCs) have literally taken control of
practically every modern manufacturing process.
The second edition text has been brought up to date, providing the latest possible information on and introduction to PLC products. We have added PLC information and pictures
from AEG Schneider Automation/Square D-Modicon and Mitsubishi Electric Automation,
Inc. A new chapter two introduces the newer and smaller micro and pico PLCs. Also, this
second edition presents explanatory pictures in two colors. This way the specific object referred to in the text is highlighted for easy understanding. The accompanying lab manual has
been updated from Rockwell Automations older APS programming software to the current
RSLogix 500 Windows programming software. All chapters and lab exercises were developed to be an easy-to-understand introduction to the world of PLCs.
Developed as a first quarter or semester introductory textbook, Introduction to Programmable Logic Controllers, Second Edition, discusses the top players in todays PLC
market and their products, including Rockwell Automation/Allen-Bradley, General Electric, Mitsubishi, Omron, Schneider Automation, and Siemens. The text was developed to
be as generic as possible. Although separate, the lab manuals hands-on programming exercises were developed for the Allen-Bradley SLC 500 and MicroLogix family of PLCs
using RSLogix 500 Windows software.
This book was developed for electrical technicians, maintenance personnel, machine
design engineers, and individuals selling PLCs in todays ever-changing manufacturing environment. Students will quickly learn the basics of todays modern PLCs. Because
the PLC is an industrial computer, many electricians and technicians are apprehensive about diving into the world of computers and the associated, seemingly foreign, terminology. This text is developed for these individuals. These new terms are explained in
plain English so those new to the world of PLCs will feel comfortable. For additional help
in understanding PLC terminology, you will find a comprehensive glossary near the end
of the book.
Topics covered will include exploring what a PLC is, operation, usage, instructions,
applications, hardware selection and configuration, introductory programming examples
and exercises, and some troubleshooting hints.
The accompanying lab manual will give the student hands-on programming and
hookup exercises. Students will configure different PLCs, set up the RSLinx drivers to
communicate from a personal computer to the PLC, select proper modules, and calculate
power supply loading. A lab exercise will walk students through a motor starter interface
to an SLC 500 PLC along with issues in converting conventional ladder start-stop into
PLC logic, separation of I/O, and proper instruction selection. Programming exercises
will provide hands-on experience developing simple programs that incorporate basic
instructions up to and including timers, counters, and sequencers.
This textbook is organized in the following manner:
ix
PREFACE
Chapter
Chapter Title
Chapter Description
Introduces the student to the world of the new and smaller micro and
pico PLCs.
Programming a Programmable
Controller
Number Systems
Covers the basics of numbers and number systems used with PLCs.
Introduction to Logic
Describes the basic logic functions and how they relate to programmable
controllers.
Input Modules
Output Modules
10
PLC Processors
Introduces the PLC processor and its capabilities, features, and basic
operation.
11
12
13
14
15
16
17
Sequencer Instructions
Appendix A
Appendix B
Appendix C
Glossary
A C K NOWL E D GM E N TS
I wish to thank my wife, Jean, for her endless hours of typing, proofreading, spell
checking, figure development, and art. Thanks to my son, Joe, for his art work for Figures 4-9, 4-13, 4-15, and 4-16.
Developing any major technical textbook requires a substantial amount of technical
information. We are greatly thankful to the following corporations who provided literature, manuals, and art along with the technical support necessary to complete this project.
AEG Schneider Automation/Square D-Modicon
Allen-Bradley, a Rockwell Automation business
ASAP Inc., Chagrin Falls, Ohio
GE Fanuc Automation
Mitsubishi Electric Automation, Inc.
Omron Electronics, Inc.
Siemens Energy & Automation Inc.
Along with Delmar, I would like to express appreciation to the following reviewers for
their encouragement and suggestions during the preparation of this manuscript:
Keith Elliott
Rockingham Community College
Wentworth, NC
William Shepherd
Owens Community College
Perrysburg, OH
Ron Meyer
Central Community College
Doniphan, NE
Daniel Lewis
James Rumsey Technical College
Bunker Hill, WV
Paul F. Owens
San Juan College
Aztec, NM
Michael Brumbach
York Technical College
Rock Hill, SC
xi