SlideShare a Scribd company logo
PLC: Hands on PLC programing with RSLOGIX500 a and Logixpro
Hands-On PLC
Programming with
RSLogix™ 500
and LogixPro®
00_Kamel_FM_i-xii.indd 1 15/07/16 6:56 PM
The study of PLCs and computer control requires extensive hands-on
experimentation and the use of hardware with possible physical access to
high-voltage supply and devices. Users must take full precautions, be aware of
safety requirements, and must not touch any of the power supply or hardware
wiring at all time.
About the Authors
Dr. Eman Kamel holds a BS in electrical engineering from Cairo University, MS in
electrical and computer engineering from the University of Cincinnati, and a
Ph.D. in industrial engineering from University of Louisville. Dr. Eman had more
than 20 years of experience in process automation at several companies, including
Dow Chemical, GE Jet Engine, Philip Morris Co., VITOK Engineers, Evana Tools,
and PLC Automation.  She designed and implemented PLC-based automation
projects in several application areas, including tobacco manufacturing, chemical
process control, wastewater treatment, plastic sheets processing, and irrigation
water level control. She has extensive experience with Siemens and Allen-Bradley
PLC programming, instrumentation, communication, and user interfaces. She has
also used and developed good knowledge and experience with other types of
PLCs, including GE, TI, Modicon, Telemechanic, Furnace, and Reliance. Eman
developed customized and interactive PLC/computer control training for several
applications. She has extensive computer-aided instruction experience and imple-
mentation in the areas of PLCs, computer control, and automation at several
universities.
Dr. Khaled Kamel is currently a professor of computer science at Texas Southern
University (TSU). He worked as full-time faculty and administrator at the Univer-
sity of Louisville Engineering School, where he was a professor and the chair of
the Computer Engineering and Computer Science department. He also worked as
instrumentation engineer at GE Jet Engine. He served as the founding dean of the
College of Information Technology at the United Arab Emirates University and
the College of Computer Science & Information Technology at the Abu Dhabi
University. Dr. Kamel received a BS in electrical engineering from Cairo Univer-
sity, a BS in mathematics from Ain Shams University, MS in computer science
from Waterloo University, and a Ph.D. in electronics and communication engi-
neering from the University of Cincinnati.Dr. Kamel worked as principle investi-
gator on several government and industry grants, which included the supervision
of over 100 graduate research Master and Doctoral students over the past 25 years.
His current research interest is more interdisciplinary in nature but focused in the
areas of Industrial Control, Sensory Fusion, and Distributed Computing.
00_Kamel_FM_i-xii.indd 2 15/07/16 6:56 PM
Hands-On PLC
Programming with
RSLogix™ 500
and LogixPro®
Eman Kamel, Ph.D.
Khaled Kamel, Ph.D.
New York  Chicago  San Francisco  Athens
London  Madrid  Mexico City  Milan  
New Delhi  Singapore  Sydney  Toronto
00_Kamel_FM_i-xii.indd 3 15/07/16 6:56 PM
Copyright © 2016 by McGraw-Hill Education. All rights reserved. Except as permitted under the United States Copyright Act of
1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval
system, without the prior written permission of the publisher.
ISBN: 978-1-25-964435-1
MHID: 1-25-964435-9
The material in this eBook also appears in the print version of this title: ISBN: 978-1-25-964434-4,
MHID: 1-25-964434-0.
eBook conversion by codeMantra
Version 1.0
All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trade-
marked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringe-
ment of the trademark. Where such designations appear in this book, they have been printed with initial caps.
McGraw-Hill Education eBooks are available at special quantity discounts to use as premiums and sales promotions or for use in
corporate training programs. To contact a representative, please visit the Contact Us page at www.mhprofessional.com.
Information contained in this work has been obtained by McGraw-Hill Education from sources believed to be reliable. However,
neither McGraw-Hill Education nor its authors guarantee the accuracy or completeness of any information published herein, and
neither McGraw-Hill Education nor its authors shall be responsible for any errors, omissions, or damages arising out of use of
this information. This work is published with the understanding that McGraw-Hill Education and its authors are supplying infor-
mation but are not attempting to render engineering or other professional services. If such services are required, the assistance of
an appropriate professional should be sought.
TERMS OF USE
This is a copyrighted work and McGraw-Hill Education and its licensors reserve all rights in and to the work. Use of this work
is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the
work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit,
distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill Education’s prior consent. You
may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to
use the work may be terminated if you fail to comply with these terms.
THE WORK IS PROVIDED “AS IS.” McGRAW-HILL EDUCATION AND ITS LICENSORS MAKE NO GUARANTEES
OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED
FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA
HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUD-
ING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. McGraw-Hill Education and its licensors do not warrant or guarantee that the functions contained in the work will
meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill Education nor its licensors
shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages
resulting therefrom. McGraw-Hill Education has no responsibility for the content of any information accessed through the work.
Under no circumstances shall McGraw-Hill Education and/or its licensors be liable for any indirect, incidental, special, punitive,
consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of
the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or
cause arises in contract, tort or otherwise.
Contents
Preface  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	xi
	 1	 Introduction to PLC Control Systems and Automation  . . . . . . . . . . . 	1
1.1  Control System Overview  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	2
1.1.1  Process Overview  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	2
1.1.2  Manual Control Operation  . . . . . . . . . . . . . . . . . . . . . . . . 	4
1.1.3  Automated System Building Blocks  . . . . . . . . . . . . . . . . 	5
1.1.4  Direct/Reverse Acting Controller  . . . . . . . . . . . . . . . . . . 	7
1.2  Hardwired Systems Overview  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	7
1.2.1  Conventional Relays  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	7
1.2.2  Relay Logic System  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	9
1.2.3  Control Relay Application  . . . . . . . . . . . . . . . . . . . . . . . . 	11
1.2.4  Motor Magnetic Starters  . . . . . . . . . . . . . . . . . . . . . . . . . . 	12
1.2.5  Latch and Unlatch Control Relay  . . . . . . . . . . . . . . . . . . 	14
1.3  PLC’s Overview  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	15
1.3.1  What Is a PLC?  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	15
1.3.2  History of PLCs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	17
1.3.3  PLC Architecture  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	21
1.3.4  Hardwired System Replacement  . . . . . . . . . . . . . . . . . . . 	22
1.3.5  PLC Ladder Logic  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	25
1.4  Manual/Auto Motor Control Operation  . . . . . . . . . . . . . . . . . . . . . 	26
1.5  SLC-500 LogixPro Simulator Setup  . . . . . . . . . . . . . . . . . . . . . . . . . 	27
1.5.1  The LogixPro 500 Screen  . . . . . . . . . . . . . . . . . . . . . . . . . . 	27
1.5.2  Editing Your Program  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	28
1.5.3  Debugging Your Program  . . . . . . . . . . . . . . . . . . . . . . . . 	28
1.5.4  RSLogix Documentation  . . . . . . . . . . . . . . . . . . . . . . . . . . 	29
1.5.5  I/O Simulator Screen  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	29
1.5.6  LogixPro 500 PLC Software  . . . . . . . . . . . . . . . . . . . . . . . 	30
1.6  Process Control Choices  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	31
Chapter 1: Home Work Problems and Laboratory Projects  . . . . . . . . . . 	32
Laboratory 1.1—LogixPro 500 Program Creation  . . . . . . . . . . . 	36
Laboratory 1.2—Program Testing  . . . . . . . . . . . . . . . . . . . . . . . . 	38
Laboratory 1.3—Converting Hardwired Control Relay
to PLC Ladder Logic   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	39
	 2	 Fundamentals of PLC Logic Programming  . . . . . . . . . . . . . . . . . . . . . . 	41
2.1  PLC Hardware  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	42
2.1.1  SLC-500 Processor  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	42
2.1.2  Operating Modes of the CPU  . . . . . . . . . . . . . . . . . . . . . . 	44
2.1.3  Communication Modules  . . . . . . . . . . . . . . . . . . . . . . . . . 	45
2.1.4  Input/Output Modules  . . . . . . . . . . . . . . . . . . . . . . . . . . 	45
v
00_Kamel_FM_i-xii.indd 5 15/07/16 6:56 PM
vi	 C o n t e n t s 	
2.1.5  Power Supply  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	46
2.1.6  SLC-500 Memory Organization/Specifications  . . . . . . 	46
2.1.7  Processor Memory Map and Program
Organization  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	47
2.2  Ladder Logic Diagrams  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	49
2.2.1  PLC Input/Output Terminal Connection  . . . . . . . . . . . 	50
2.2.2  PLC Boolean Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . 	51
2.2.3  LogixPro 500 Data Files  . . . . . . . . . . . . . . . . . . . . . . . . . . 	53
2.3  Combinational Logic  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	55
2.3.1  Logic Gate Operations  . . . . . . . . . . . . . . . . . . . . . . . . . . . 	55
2.3.2  LogixPro 500 Implementation Examples   . . . . . . . . . . . 	59
2.3.3  I/O Testing Using the Force Function  . . . . . . . . . . . . . . 	61
2.4  Combinational Word Logic Operations  . . . . . . . . . . . . . . . . . . . . . . 	64
2.4.1  AND Word Logic Operation  . . . . . . . . . . . . . . . . . . . . . . 	64
2.4.2  OR Word Logic Operation  . . . . . . . . . . . . . . . . . . . . . . . . 	65
2.4.3  XOR Word Logic Operation  . . . . . . . . . . . . . . . . . . . . . . . 	66
2.4.4  NOT Word Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . 	66
2.5  Latch, Unlatch, Subroutine, and One-Shot Instructions  . . . . . . . . 	67
2.5.1  Latch and Unlatch Instructions  . . . . . . . . . . . . . . . . . . . . 	68
2.5.2  Positive/Negative Edge One-Shot Instruction  . . . . . . . 	68
2.5.3  File shift Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	72
2.5.4  JSR Instructions and Subroutine Nesting  . . . . . . . . . . . . 	73
Chapter 2: Home Work Problems and Laboratory Projects  . . . . . . . . . . 	78
Laboratory 2.1—Programming Combinational Logic   . . . . . . . 	83
Laboratory 2.2—Basic Word Logic Operation Using
Structured Programing   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	84
Laboratory 2.3—Controlling a Conveyor Belt Using Latch
and Unlatch Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	86
Laboratory 2.4—Conveyor Belt Movement Directions  . . . . . . 	87
	 3	 Timers and Counters Programming  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	89
3.1  ON-Delay Timers  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	90
3.2  Generating a Pulse Timer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	93
3.3  OFF-Delay Timers  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	95
3.4  Retentive Timers-On-Delay  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	98
3.5  Fundamentals of Counters  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	100
3.5.1  Count-Up Counters   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	100
3.5.2  Count-Down Counters  . . . . . . . . . . . . . . . . . . . . . . . . . . . 	103
Chapter 3: Home Work Problems and Laboratory Projects  . . . . . . . . . . 	107
Laboratory 3.1—Merry-Go-Round  . . . . . . . . . . . . . . . . . . . . . . . 	114
Laboratory 3.2—Machine Tool Operation  . . . . . . . . . . . . . . . . . 	114
Laboratory 3.3—Pump Fail to Start Alarm  . . . . . . . . . . . . . . . . 	116
Laboratory 3.4—Vertical Gate Monitoring  . . . . . . . . . . . . . . . . . 	116
Laboratory 3.5—Cooling System Control  . . . . . . . . . . . . . . . . . 	117
Laboratory 3.6—OFF-Delay Control of Three Motors  . . . . . . . 	117
00_Kamel_FM_i-xii.indd 6 15/07/16 6:56 PM
C o n t e n t s 	 vii
Laboratory 3.7—Pump Start/Stop Control for
Predefined Calendar  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	118
Laboratory 3.8—Conveyor System Control  . . . . . . . . . . . . . . . . 	118
	 4	 Math, Move, and Comparison Instructions  . . . . . . . . . . . . . . . . . . . . . . 	121
4.1  Math Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	122
4.1.1  Numbering Systems  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	122
4.1.2  SLC-500 Data and Numbers Representation  . . . . . . . . . 	123
4.1.3  Common Math Instructions  . . . . . . . . . . . . . . . . . . . . . . . 	126
4.1.4  Advanced Math Instruction  . . . . . . . . . . . . . . . . . . . . . . . 	133
4.1.5  Swap Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	135
4.1.6  Arithmetic Status Bits  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	137
4.2  Move and Transfer Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	138
4.2.1  Move Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	138
4.3  Comparison Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	139
4.3.1  Equal Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	139
4.3.2  Not Equal Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	139
4.3.3  Greater Than or Equal Instruction  . . . . . . . . . . . . . . . . . 	139
4.3.4  Less Than or Equal Instruction  . . . . . . . . . . . . . . . . . . . . 	142
4.3.5  Greater Than Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . 	142
4.3.6  Less Than Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	142
4.3.7  Masked Move Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . 	145
4.4  Program Control Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	145
4.4.1  Jump Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	145
4.4.2  Subroutine Call  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	148
4.5  Implemented Industrial Application  . . . . . . . . . . . . . . . . . . . . . . . . 	149
4.5.1  Common Process Control Tasks  . . . . . . . . . . . . . . . . . . . 	151
4.5.2  Industrial Control Applications  . . . . . . . . . . . . . . . . . . . . 	152
Chapter 4: Home Work Problems and Laboratory Projects  . . . . . . . . . . 	158
Laboratory 4.1—Tank Alarm  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	164
Laboratory 4.2—Feed Flow Digester Control  . . . . . . . . . . . . . . 	165
Laboratory 4.3—Merry-Go-Round Using One Timer  . . . . . . . 	166
Laboratory 4.4—Pumps Alternation Using
Structured Programming  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	166
Laboratory 4.5—Tank Fill/Refill  . . . . . . . . . . . . . . . . . . . . . . . . . 	167
	 5	Human Machine Interface Design and Hardware
Configuration  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	169
5.1  Allen-Bradley PLC Networking Options  . . . . . . . . . . . . . . . . . . . . . 	172
5.2  PanelView Plus 600 Graphic Terminal  . . . . . . . . . . . . . . . . . . . . . . . 	173
5.3  Door Control Simulator/Monitor  . . . . . . . . . . . . . . . . . . . . . . . . . . . 	173
5.4  Silo Conveyor Control Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . 	181
5.5  Single Batch Mode Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	185
5.6  One-Way Intersection Traffic Light Control  . . . . . . . . . . . . . . . . . . 	191
5.7  Bottling Assembly Line Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	195
00_Kamel_FM_i-xii.indd 7 15/07/16 6:56 PM
viii	 C o n t e n t s 	
5.8  PLC Trainer and Hardware Configuration  . . . . . . . . . . . . . . . . . . . 	201
5.8.1  Book Training Unit Setup  . . . . . . . . . . . . . . . . . . . . . . . . . 	201
5.8.2  RSLogix500 Software  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	202
5.8.3  RSLinx and Online Operation  . . . . . . . . . . . . . . . . . . . . . 	204
5.8.4  Online Application Debugging  . . . . . . . . . . . . . . . . . . . . 	207
Chapter 5: Home Work Problems and Laboratory Projects  . . . . . . . . . . 	212
Laboratory 5.1—Garage Door Operation Control  . . . . . . . . . . 	213
Laboratory 5.2—Flashing Light Indicators   . . . . . . . . . . . . . . . . 	215
Laboratory 5.3—BCD I/O Simulator  . . . . . . . . . . . . . . . . . . . . . 	216
Laboratory 5.4—Batch Process Auto/Manual
Operation Modes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	217
Laboratory 5.5—Batch Process Chemical Reactor  . . . . . . . . . . 	218
Laboratory 5.6—Structured Program for One-Way
Traffic Lights Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	219
Laboratory 5.7—Batch Process Using ON-OFF
Level Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	220
Laboratory 5.8—Conveyor Inspection Station Control  . . . . . . 	220
Laboratory 5.9—Structured Programming for the
Bottling Assembly line  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	222
	 6	 Process Control Design and Troubleshooting  . . . . . . . . . . . . . . . . . . . . 	225
6.1  Process Control Overview, Layer 1  . . . . . . . . . . . . . . . . . . . . . . . . . . 	226
6.1.1  Process Descriptions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	227
6.1.2  Level of Control/Automation  . . . . . . . . . . . . . . . . . . . . . 	227
6.1.3  Control System Components  . . . . . . . . . . . . . . . . . . . . . . 	228
6.2  Process Control Implementation, Layer 2  . . . . . . . . . . . . . . . . . . . . 	229
6.2.1  I/O List  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	229
6.2.2  Data Acquisition and Closed Loop Control Tasks  . . . . . 	230
6.2.3  Project Logic Diagrams and Ladder Function
Blocks  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	231
6.2.4  Control System Preliminary Documentation  . . . . . . . . 	231
6.2.5  Program Documentation Using Cross Reference  . . . . . 	232
6.3  Process Control Checkout and Startup, Layer 3  . . . . . . . . . . . . . . . 	232
6.3.1  Debugging Using Find and Replace Function  . . . . . . . 	234
6.3.2  Debugging Using Program Data File  . . . . . . . . . . . . . . . 	234
6.3.3  Debugging Using Advance Diagnostic  . . . . . . . . . . . . . 	235
6.3.4  Checkout Using Forcing Functions  . . . . . . . . . . . . . . . . . 	235
6.3.5  Checkout Using Custom Data Monitors   . . . . . . . . . . . . 	241
6.4  System Checkout and Troubleshooting  . . . . . . . . . . . . . . . . . . . . . . 	242
6.4.1  Static Checkout  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	243
6.4.2  Wired Master Control Relay Safety Standards  . . . . . . . 	244
6.4.3  Master Control Reset Instruction Control Zones  . . . . . 	246
6.5  Safeguard Implementation Examples  . . . . . . . . . . . . . . . . . . . . . . . 	248
Chapter 6: Home Work Problems and Laboratory Projects  . . . . . . . . . . 	250
Laboratory 6.1—Conveyor System Control  . . . . . . . . . . . . . . . . 	252
Laboratory 6.2—Irrigation Canal Sensors, Validation
and Calibration  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	253
00_Kamel_FM_i-xii.indd 8 15/07/16 6:56 PM
C o n t e n t s 	 ix
	 7	 Instrumentation and Process Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . 	257
7.1  Instrumentation Basics  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	258
7.1.1  Sensors Basics  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	258
7.1.2  Analog Sensors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	259
7.1.3  Digital Sensors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	259
7.2  Process Control Elements  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	260
7.2.1  Basic Measurement System  . . . . . . . . . . . . . . . . . . . . . . . 	260
7.2.2  Process Control Variables  . . . . . . . . . . . . . . . . . . . . . . . . . 	261
7.2.3  Signal Conditioning  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	262
7.2.4  Signal Transmitters  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	263
7.3  Signal Conversion  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	263
7.3.1  Analog-to-Digital Conversion  . . . . . . . . . . . . . . . . . . . . . 	263
7.3.2  Digital-to-Analog Conversion  . . . . . . . . . . . . . . . . . . . . . 	265
7.3.3  Quantification Errors and Resolution  . . . . . . . . . . . . . . . 	266
7.4  Process Control System  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	267
7.4.1  Control Process  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	268
7.4.2  Controlled Variables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	268
7.4.3  Control Strategy and Types  . . . . . . . . . . . . . . . . . . . . . . . 	269
7.4.4  Process Control Loop  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	270
7.4.5  Control System Error Quantification  . . . . . . . . . . . . . . . 	272
7.4.6  Control System Transient and Performance
Evaluation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	272
7.5  Closed-Loop Process Control Types  . . . . . . . . . . . . . . . . . . . . . . . . . 	273
7.5.1  On/Off Control Mode  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	275
7.5.2  Proportional Control Mode  . . . . . . . . . . . . . . . . . . . . . . . 	275
7.5.3  Composite Control Mode  . . . . . . . . . . . . . . . . . . . . . . . . . 	277
7.5.4  PLC/Distributed Computer Supervisory Control  . . . . 	277
Chapter 7: Home Work Problems and Laboratory Projects  . . . . . . . . . . 	279
Laboratory 7.1—On/Off Temperature Control   . . . . . . . . . . . . 	281
Laboratory 7.2—Tank Level and Flow Rate Monitoring  . . . . . 	284
	 8	 Analog Programming and Advanced Control  . . . . . . . . . . . . . . . . . . . . 	285
8.1  Analog Input/Output Configuration and Programming  . . . . . . . 	286
8.1.1  Analog Input/Output Modules  . . . . . . . . . . . . . . . . . . . 	286
8.1.2  Configuring Analog Input/Output Modules  . . . . . . . . 	286
8.1.3  Scale Instruction   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	287
8.1.4  NIO4V Composite Module Bit Addressing
and Data Conversion  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	289
8.1.5  Analog Scaling and Mapping   . . . . . . . . . . . . . . . . . . . . . 	292
8.2  PID Control Configuration and Programming  . . . . . . . . . . . . . . . . 	296
8.2.1  Closed-Loop Control System  . . . . . . . . . . . . . . . . . . . . . . 	296
8.2.2  Control System Time Response  . . . . . . . . . . . . . . . . . . . . 	298
8.2.3  Control System Types  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	300
8.2.4  Controllers Behavior  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	302
8.2.5  Selection of the Suitable Controller Structures  . . . . . . . 	304
00_Kamel_FM_i-xii.indd 9 15/07/16 6:56 PM
x	 C o n t e n t s
8.3  PID Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	305
8.3.1  SLC-500 PID Control Block  . . . . . . . . . . . . . . . . . . . . . . . 	306
8.3.2  SLC-500 Tank Level PID Control  . . . . . . . . . . . . . . . . . . . 	310
8.4  PID Tuning  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	312
8.4.1  PID Closed-Loop Tuning  . . . . . . . . . . . . . . . . . . . . . . . . . 	313
8.4.2  Manual Tuning  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	314
8.4.3  Ziegler-Nichols Method  . . . . . . . . . . . . . . . . . . . . . . . . . . 	315
8.4.4  Cohen-Coon Tuning Method   . . . . . . . . . . . . . . . . . . . . . 	315
8.4.5  PID Tuning Software  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	316
8.4.6  Integral Windup and PI Controllers  . . . . . . . . . . . . . . . . 	317
Chapter 8: Home Work Problems and Laboratory Projects  . . . . . . . . . . 	318
Laboratory 8.1—Tank Level Sensors Measurement
Processing and Monitoring   . . . . . . . . . . . . . . . . . . . . . . . . . . 	319
Laboratory 8.2—Validating and Monitoring Power
Supply Voltage  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	322
Laboratory 8.3—Simple Closed-Loop PID Control  . . . . . . . . . 	325
	 9	 Comprehensive Case Studies  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	327
9.1  Irrigation Canal Water Level Control  . . . . . . . . . . . . . . . . . . . . . . . . 	328
9.1.1  System I/O Map  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	329
9.1.2  Logic Diagrams  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	329
9.1.3  Automated System Building Blocks  . . . . . . . . . . . . . . . . 	332
9.2  Irrigation Canal Ladder Implementation  . . . . . . . . . . . . . . . . . . . . 	334
9.3  Wet Wells Pump Station Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	346
9.3.1  System I/O Map  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	346
9.3.2  Automated System Building Blocks  . . . . . . . . . . . . . . . . 	347
9.4  Pumping Station Ladder Implementation  . . . . . . . . . . . . . . . . . . . . 	348
9.4.1  Pump Alarms   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	348
Chapter 9: Home Work Problems and Laboratory Project  . . . . . . . . . . . 	354
Laboratory 9.1—Conveyor System Speed Control
Capstone Project  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	354
		 Odd-Numbered Home Work Problem Solutions  . . . . . . . . . . . . . . . . . 	361
		Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	393
		Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 	405
00_Kamel_FM_i-xii.indd 10 15/07/16 6:56 PM
Preface
T
his book offers readers an introduction to PLC programming with focus on real
industrial process automation applications. Rockwell Allen-Bradley SLC-500
PLC hardware configuration and the LogixPro 500 simulation software are
described and used throughout the book. A small and inexpensive training setup with
a power supply, processor, inputs/outputs discrete modules, analog inputs/outputs
module, ON/OFF switches, push button switches, LEDs/light indicators, processor-
integrated multiports communication ports, and a programing laptop was used to
illustrate all programming concepts and the implementation of parts of completed
automation projects by the authors in the past 20 years. All programming and project
implementation in the first five chapters are described using the LogixPro 500 SLC-
500 PLC simulation software. PLC hardware setup or software is not needed for the
LogixPro use, but you must have the LogixPro 500 simulation software installed on
your computer/laptop. If you have access to a training unit or SLC-500 hardware, you
can use the AB RSLogix software.
Each chapter contains a set of homework questions and small laboratory design,
programming, debugging, or maintenance projects. Two comprehensive capstone
design projects are detailed at the end of this book in Chap. 9. All programs and system
configurations described in chapters or included in the end of chapters homework
assignments are fully implemented and tested. Complete solutions to all end-of-chap-
ter laboratory assignments are available for instructors on request. Odd-numbered
homework problem solutions are included in the book appendix. Concepts of process
control and automation are introduced in Chap. 1. Chapter 2 details the fundamental
of relay logic programming. It also covers the architecture and operation of PLCs.
Configuration, operation, and the programming of timers and counters are the focus
of our coverage in Chap. 3.
Chapter 4 is dedicated to the coverage of mathematical, logic, and commonly used
commands operations with an emphasis on their use in real-time industrial applica-
tions. Ladder programming, for both PLC ladder logic and HMI user interface, are dis-
cussed in detail in Chap. 5. Modular structured programming design is used with
emphasis on industrial standers and safety. Coverage is specific to the Allen-Bradley
SLC-500 processor and the LogixPro 500 software, but the concepts are applicable to
other systems.
System checkouts and troubleshooting are typically the most challenging and time-
consuming tasks in industrial automation/process control applications. Chapter 6 con-
tains common design and troubleshooting techniques. It also addresses critical issues
xi
00_Kamel_FM_i-xii.indd 11 15/07/16 6:56 PM
xii	 P r e f a c e
of validation, hazards, safety standards, and protection against hardware/software
failures or malfunction. Analog programming and associated instrumentation is cov-
ered in Chap. 7. Configuration, interface, scaling, calibration, and associated user inter-
face are briefly covered.
Chapter 8 presents a comprehensive introduction to open- and closed-loop digital
process control. Topics covered include sensors, actuators, on/off control, feedback
control, PID tuning, and measures of good control. This chapter is intended to provide
users with the understanding of the big picture of a control system in terms of system
tasks, requirements, and overall expectations. It can best serve advanced engineering/
technology, CS, or IT students as a prerequisite to the fundamentals and hands-on activ-
ities covered in the first seven chapters of the book. It can also serve other readers as a
recap to the skills learned in previous chapters.
The book concludes with a comprehensive case study in Chap. 9. The case details
the specifications of an irrigation canal downstream water level control. Coverage pro-
ceeds from the specification level to the final system design/implementation with asso-
ciated documentation. The project is a small part of a much larger project implemented
by the authors in Egypt more than 10 years ago. All implementations are redone using
the AB SLC-500 PLC system. A second case study commonly used in waste water treat-
ment facilities PLC control, wet wells pumping station, is briefly covered.
Recent advances in industrial process control have produced more intelligent and
compact PLC hardware as the one we adopted in this book, AB SLC-500 system. It has
also made available an extremely user-friendly development software for structured
ladder programming, communication, easier configuration, modular design, documen-
tation, and overall system troubleshooting. These advancements have created many
opportunities for challenging and rewarding careers in the areas of PLC technology and
process automation. This book is intended for a senior-level, one-semester course in an
academic setting with the expectation of weekly hands-on laboratory work outside the
class. Chapters 1 through 5 can serve as the content for a one-quarter course with ade-
quate laboratory time. The book can also be used for a two full-week’s industrial train-
ing in a small group setting with adequate training setup for each user. Successful
career opportunity in the demanding field of PLC control and automation requires
acquisition of the skills in this book along with adequate hands-on experience.
Eman Kamel, Ph.D.
Senior Control Engineer
PLC Automation
Khaled Kamel, Ph.D.
Professor, CS Department
Texas Southern University
00_Kamel_FM_i-xii.indd 12 15/07/16 6:56 PM
1
CHAPTER 1
Introduction to PLC
Control Systems
and Automation
T
his chapter is an introduction to the world of programmable logic controllers
(PLCs) and their evolution over the past fifty years as the top choice and the
most dominant among all systems available for process control and automation
applications.
AG 170 kW hydropower generator built and installed in 1912.
01_Kamel_CH01_p001-040.indd 1 15/07/16 8:09 PM
2	 Chapter One
Chapter Objectives
•	 Understand concepts of process control.
•	 Realize the history of PLC and relay logic.
•	 Understand PLC hardware architecture.
•	 Understand the characteristics of hardwired and PLC systems.
A programmable logic controller is a microprocessor-based computer unit that can per-
form control functions of many types and varying levels of complexity. The first com-
mercial PLC system was developed in the early 1970s to replace hardwired relay
controls used in large manufacturing assembly plants. The initial use of PLCs covered
automotive, jet engines, and large chemical plants. PLCs are used today in many tasks,
including robotics, conveyor systems, manufacturing controls, process controls, electric
power plants, wastewater treatment, and security applications. This chapter is an intro-
duction to the world of PLCs and their evolution over the past fifty years as the top
choice and the most dominant among all systems available for process control and
automation applications.
1.1  Control System Overview
A control system is a device or set of structures designed to manage, command, direct,
or regulate the behavior of other devices or system. The entire control system can be
viewed as a multivariable process having a number of inputs and outputs, which can
affect the behavior of the process. Figure 1.1 shows this functional view of control sys-
tems. This section is intended as a brief introduction, and will be covered in more detail
in Chapter 7.
1.1.1 Process Overview
In the industrial world, the word process refers to an interacting set of operations that
lead to the manufacture or development of a product. In the chemical industry, it refers
to the operations necessary to take an assemblage of raw materials and cause them to
react in some prescribed fashion to produce a desired end product, such as gasoline. In
the food industry, it means to take raw materials and operate on them in such a manner
that an edible high-quality product results. In each use, and in all other cases in the
process industries, the end product must have certain specified properties, which
depend on the conditions of the reactions and operations that produce them. The word
control is used to describe the steps necessary to ensure that the regulated conditions
produce the correct properties in the product.
Figure 1.1  Control systems—functional view.
Inputs Outputs
Multivariable
process
01_Kamel_CH01_p001-040.indd 2 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 3
A process can be described by an equation. Suppose we let a product be defined
by a set of properties: P1
, P2
, ..., and Pn
. Each of these properties must have a certain
value for the product to be correct. Examples of properties are color, density, chemical
composition, and size. The process can be assumed to have m variables characteriz-
ing its unique behavior. Some of these variables can also be categorized as input,
output, process property, and internal or external system parameters. The following
equations express a process property and a variable as a function of process variables
and time.
Pi
= F (v1
, v2
, . . . vm
, t)
vi
= G (v1
, v2
, . . . vm
, t)
where Pi
= the ith process property
	 vi
= the ith process variable
	 t = time
To produce a product with the specified properties, some or all the m process vari-
ables must be maintained at specific values in real time. Figure 1.2 shows free water
flow through a tank, similar to rain flow in a home gutter system or a small creek. The
tank acts in a way to slow the flow rate through the piping structure.
The output flow rate is proportional to the water head in the tank. Water level inside
the tank will rise as the input flow rate increases. At the same time output flow rate will
increase with noticeable increase in the tank water level. Assuming a large enough tank,
level stability will be reached when flow in is equal to flow out. This simple process has
three primary variables: flow in, flow out, and tank level. All three variables can be
measured and, if desired, can also be controlled. The tank level is said to be a self-regu-
lated variable.
Some of the variables in a process may exhibit the property of self-regulation,
whereby they will naturally maintain a certain value under normal conditions. Small
disturbances will not affect the tank level stability due to its self-regulating character-
istic. A small increase in tank flow in will cause a slight increase in the water level. An
increase in water level will cause an increase in the flow out, which will eventually
produce a new stable tank level. Large disturbances in the tank input flow may force
Flow in
Flow out
Figure 1.2  Water flow tank process.
01_Kamel_CH01_p001-040.indd 3 15/07/16 8:09 PM
4	 Chapter One
undesired changes in the tank level. Control of variables is necessary to maintain the
properties of the product, the tank level in our example, within specification. In general,
the value of a variable v actually depends on many other variables in the process and
also on time.
1.1.2  Manual Control Operation
In a manual control system, humans are involved in monitoring the process and mak-
ing the decisions necessary to bring about desired changes in the process. Computers
and advanced digital technologies may be used to automate a wide variety of process
operation, status, command, and decision support functions. Sensors and measurement
instruments are used to produce different process variables status, while final control
elements or actuators are used to force changes in the process. As shown in Figure 1.3,
humans close the control loop and establish the connection between measured values,
desired conditions, and the needed activation of the final control elements.
Manual control is widely available and can be effective for simple and small appli-
cations. The initial cost of such systems might be relatively smaller than automated
ones, but the long-term cost is typically much higher. It is difficult for operators to
achieve the same control and quality due to various factors, such as different levels of
domain expertise and unexpected changes in the process. The costs of operation and
training can also become a burden unless certain functions are automated. Most sys-
tems start by using manual control or existed previously through manual operation. As
the system owners acquire and accumulate process control experience over time, they
use this knowledge to make process improvements and eventually automate the con-
trol system.
The introduction of digital computers in the control loop has allowed the develop-
ment of more flexible control systems, including higher-level functions and advanced
algorithms. Furthermore, most current complex control systems can not be imple-
mented without the application of digital hardware. However, the simple sequence of
sensing, control, and actuation for the classic feedback control becomes more complex
as well. A real-time system is one in which the correctness of a result depends not only
on the logical correctness of the calculation but also on the time at which the different
Load disturbance
Process
Final control
element
Measuring
element
SP
Figure 1.3  Manual control systems.
01_Kamel_CH01_p001-040.indd 4 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 5
tasks are executed. Time is one of the most important entities of the system, and there
are timing constraints associated with systems tasks. Such tasks normally have to con-
trol or react to events that take place in the outside world, which are happening in “real
time.” Thus, a real-time task must be able to keep up with the external events with
which it is concerned.
Figure 1.4 shows a simple manual control system. The level in the tank varies as a
function of the flow rate through the input valve and the flow rate through the output
valve. The level is the control or controlled variable, which can be measured and
regulated through valve control and adjustment at the input or the output flow or
both. The two valves can be motorized and activated from an easy-to-use operator
interface. Valve position variations are achieved through an operator input based on
observed process real-time conditions. We will see next that the operator can easily be
eliminated.
1.1.3  Automated System Building Blocks
The closed control loop shown in Figure 1.5 consists of the following five blocks:
•	 Process
•	 Measurement
•	 Error detector
•	 Controller
•	 Control element
In manual control, the operator is expected to perform the task of error detection and
control. Observations and actions taken by operators can lack both consistency and reli-
ability. The limitation of manual control can be eliminated through the implementa-
tion of closed-loop systems and the associated process control strategies. Details of such
Flow in
Flow out
Figure 1.4  Tank level manual controls.
01_Kamel_CH01_p001-040.indd 5 15/07/16 8:09 PM
6	 Chapter One
strategies will be detailed in Chapter 7. Figure 1.5 shows a block diagram of a single-
variable closed-loop control. The controller can be implemented using various tech-
nologies, including hardwired relay circuits, digital computers, and more often the
PLC systems.
It is impossible to achieve perfect control, but in the real world it is not needed. We
can always live with small errors within our acceptable quality range. An oven with a
desired temperature of 500°F can achieve the same results at 499.99°F. In most cases we
are limited by the precision and cost of the actual sensors. There is no good justification
for spending more money to achieve unwanted/unnecessary gains in precision.
Errors in real time are used to judge the quality of the system design and its associ-
ated controller. The errors can be measured in three ways as explained below using the
following definitions:
Absolute error = set point − measured value
Error as percentage of set point = absolute error/set point * 100
Error as percentage of range = absolute error/range * 100
Range = maximum value − minimum value
Errors are commonly expressed as percentage of range and occasionally as percent of
set point but rarely as an absolute value. Also, most process variables are commonly
also quantified as percentage of the defined range. This quantification allows for uni-
versal input/output (I/O) PLC computer interfaces regardless of the physical nature of
the sensory and actuating devices. A PLC analog input module having several input
slots can accommodate and process temperature, pressure, motor speed, viscosity, and
many other measurements in exactly the same way. Later chapters will detail the PLC
hardware and software as applied to real-world industrial control applications. Even
though the implementation focus will be on the AB SLC 500, the concepts covered will
apply to other PLCs with no or very little modifications. International standards and
the success of open system architectures are the main reasons for the universal nature
of today’s PLC technology and its compatibility.
SP
Final control
element
Process
Upset, or
load disturbance
Controller
Measuring element
Figure 1.5  Closed-loop control.
01_Kamel_CH01_p001-040.indd 6 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 7
1.1.4  Direct/Reverse Acting Controller
The controller can be designed to provide an output that is either directly propor-
tional to the amount of error in the process or inversely proportional to the error. This
type of controller behavior is labeled as direct and reverse action, respectively. We
will demonstrate this concept using the liquid tank of Figure 1.4 for a level control
process. The error in level is expressed as the difference between the set point and the
measured value. The following are the two possible control strategies based on the
error value:
•	 Direct acting: In this control strategy, we regulate the tank level by adjusting the
position of the inlet valve while keeping the outlet valve position fixed. If the error
is positive (set point larger than the measured value), then the controller output
(inlet valve position) will increase. This will allow more flow into the tank and
will cause the level to increase, which in turn will reduce the process error. The
behavior of the controller in this case is known as direct acting.
•	 Reverse acting: In this control strategy, the level is regulated by adjusting the
position of the outlet valve while keeping the inlet valve position fixed. If the
error is positive (set point greater than the measured value), then the controller
output (outlet valve position) will decrease. This will allow less flow out of the
tank and will cause the level to increase, which in turn will reduce the process
error. The behavior of the controller in this case is known as reverse acting.
1.2  Hardwired Systems Overview
Prior to the widespread use of PLCs in process control and automation, hardwired
relay control systems or analog single-loop controllers were used. This section will
briefly introduce relay systems and the logic used in process control. It is important that
the reader understands the fundamentals of relays in order to fully appreciate the role
of PLCs in replacing relays, simplifying process control design/implementation, and
enhancing process quality at a much lower overall system cost. Coverage in this section
is limited to functionality and application without much detail of either electrical or
mechanical characteristics.
1.2.1  Conventional Relays
In this section we will learn how a relay actually works. A relay is an electromagnetic
switch having a coil and a set of associated contacts of a typical relay, as shown in
Figure 1.6. Contacts can be either normally open or normally closed. An electromag-
netic field is generated once voltage is applied to the coil. This electromagnetic field
generates a force that pulls the contacts of the relay, causing them to make or break
the controlled external circuit connection. These electrically actuated devices are used
in automobiles and industrial applications to control whether a high-power device is
switched ON or OFF. While it is possible to have a device, such as a large industrial
motor or ignition system, directly powered by an electrical circuit without the use of
a relay, such choice is neither safe nor practical. For example, in a factory, a motor
control may be placed far away from the high-voltage electrical motor and its power
source for safety reasons. In this case, it is more practical to have a low-power elec-
trical relay coil circuit control a high-power relay contacts than to directly wire a
01_Kamel_CH01_p001-040.indd 7 15/07/16 8:09 PM
8	 Chapter One
high-power electrical switch from the control area to the motor and its independent
power supply.
Figure 1.7 shows a control relay (CR1) with two contacts normally open (CR1-1)
and normally closed (CR1-2). On the left side of the figure, power is not applied to the
coil (CR1) and the two contacts are in the normal state. On the right side of the same
figure, power is applied to the coil and the two contacts switch state; the normally open
contact closes and the normally closed contact opens.
Figure 1.8 shows a simple relay circuit for controlling a bell using a single pole
single through (SPST) switch; pressing the switch causes the bell to sound. A relay is
typically used to control a device that requires high voltage or draws large current.
Figure 1.6  Typical industrial relays.
No
power
CR1-1 CR1-1
CR1
CR1-2 CR1-2
Power
CR1CR1
Figure 1.7  Relay with two contacts normally open and normally closed.
01_Kamel_CH01_p001-040.indd 8 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 9
The relay allows full power to the device without needing a mechanical switch that
can carry the high current. A switch is normally used to control the low-power side,
the relay coil side. Notice that we have two separate circuits: the bottom uses the dc
low power, while the top utilizes the ac high power. The two circuits are only con-
nected through electromagnetic field coupling. The low-power dc side is connected to
the coil while the high-power ac side in this example is located in the field away from
the control room. The two sides are normally powered from two independent sources
in a typical industrial facility automated application. Of course it is not cost effective
to replace the relay in this example with a PLC, but it does for a real application with
hundreds or thousands of I/O devices.
1.2.2  Relay Logic System
Relay logic systems are control structures appropriate for both industrial and municipal
applications. The operations/processes that will be controlled by relay logic systems
are hardwired, unlike programmable logic control systems. These systems are inflexible
and can be difficult to modify after deployment. Since the operation of relay logic con-
trollers is built directly into the device, it is easy to troubleshoot the system should any
problems arise. Such control systems are developed with fixed features for specific
applications. Typically, large pumps and motors will be equipped with hardwired relay
control to protect them against damage under overloads and other undesired working
conditions. Programmable logic control systems provide much—needed flexibility and
allow for future continuous quality improvements in the process.
Figure 1.9 shows two relay circuits for implementing two inputs “AND” and “OR”
logic functions, respectively. Each relay has two magnetic coils and associated normally
closed (NC) contacts. The two inputs are connected to one side of each of the two coils
and the other end of the coil is connected to the ground. The contacts are connected in
a predefined manner to produce the desired output as a function of the two inputs.
Input A and Input B can be at either the Ground level (0/Low logic/False logic) or the
+V level (1/High logic/True logic). The AND arrangement produces the +V logic (High
logic) only when the two inputs are high while the OR configuration produces the
Ground logic (Low logic) only when the two inputs are low. Notice that the relay opera-
tion involves electrical (coils and power supply) and mechanical (moving contacts)
components.
Schematic diagrams for relay logic circuits are often called logic diagrams. A relay
logic circuit is an electrical diagram consisting of lines/networks/rungs in which each
Bell
DC
Switch
Contact
Coil
Relay
AC
Figure 1.8  Simple relay circuit.
01_Kamel_CH01_p001-040.indd 9 15/07/16 8:09 PM
10	 Chapter One
must have continuity to enable the intended output device. A typical circuit consists of
a number of rungs, with each controlling an output. This output is controlled through a
combination of input or output conditions (such as switches and control relays) con-
nected in series, parallel, or series-parallel to obtain the desired logic to drive the out-
put. Relay logic diagrams represent the physical interconnection of devices. It is possible
to design a relay logic diagram directly from the narrative description of a process
control event sequence. In ladder logic diagrams, an electromechanical relay coil is
shown as a circle and the contacts actuated by the coil as two parallel lines. Given this
notation, the relay line logic diagrams for AND and OR logic functions are shown in
Figure 1.10.
The “L1
” and “L2
” designations in the logic diagram refer to the two poles of a 120
ac voltage power supply. L1
is the hot side of the supply and L2
is the ground/neutral
side. Output devices are always connected to L2
. Any device overloads that are to be
+V +V+V
+V
Input A
Input B Input B
Input A
Output Output
(a) (b)
Figure 1.9  (a) AND logic function; (b) OR logic function.
CR1
CR2
IndicatorCR1
IndicatorCR1CR2 CR2
A
CR1
CR2
A
L1
L1
L2
L2
B
B
Indicator
A or B
Indicator
A and B
Figure 1.10  Relay line logic diagrams.
01_Kamel_CH01_p001-040.indd 10 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 11
included must be shown between the output device and L2
; otherwise the output device
must be the last component before L2
. Input devices are always shown between L1
and
the output device. Relay contacts control devices may be connected either in series,
parallel, or a combination of both.
1.2.3  Control Relay Application
Relays are widely used in process control and automation applications. PLCs have
gained much acceptance in the last thirty years and have gradually replaced most of the
old, hardwired relay-based control systems. It is important that we understand the old
relay control systems in order to appreciate and make the transition to the more power-
ful, easier to implement, cheaper to maintain, and reliable PLC control. This section
documents two simple relay control applications.
Figure 1.11 shows the line diagram for a common application of an electromechani-
cal relay DC motor control circuitry. A momentary normally open (NO) push button
switch starts the motor and another normally closed (NC) push button switch-stops the
motor. The control relay contact is used to latch the start push button after it is released.
Another contact associated with the same relay is used to start the motor. Pressing the
stop push button at any time will interrupt the flow of electricity supply to the motor
and cause it to stop.
Another application is shown in Figure 1.12. The line diagram illustrates how a
three-contact relay is used to control two pilot lights. The desired control is accom-
plished using two push button switches; PB1 starts the operation and PB2 terminates it
at any time.
Below are the critical steps for this example:
•	 With no power applied to the control relay the contacts are in normal state. The
normally open is open and the normally close is close. The green pilot light (G)
receives power and turns ON as indicated by the green fill light. The red pilot
light (R) is OFF, as shown.
•	 Rung 1: Once PB1 is pressed, CR1 coil becomes energized; this in turn makes
contact. CR1-1 closes and maintains power to CR1 through the normally closed
push button PB2.
Start
CR1-1
CR1-2
CR1
Mtr
Stop
Figure 1.11  DC motor controls.
01_Kamel_CH01_p001-040.indd 11 15/07/16 8:09 PM
12	 Chapter One
•	 When CR1 energizes the contacts switch state, the normally open closes and the
normally close opens. This will turn OFF the green light in rung 2 and turn ON
the red light on rung 3.
•	 When the PB2 push button is pressed, the control relay loses power and the
contacts switch to the normal state. This results in turning the green light ON
and the red light OFF.
1.2.4  Motor Magnetic Starters
A magnetic starter is used to control high power to a motor, as shown in Figure 1.13.
Three of the motor magnetic starter contacts are used to connect the three phases of the
high voltage supply. In addition, overload relays are physically attached in series with
the three-phase supply voltage (L1, L2, and L3) for the motor’s protection. Figure 1.14
shows a low-power motor starter circuit at the Motor Control Center (MCC). START
and STOP PB switches start and stop the motor through the control of its magnetic
starter. The magnetic starter contact M-4 is used to latch the motor start action.
Figure 1.15 illustrates a line diagram of a magnetic reversing motor starter con-
trolled by forward and reverse push buttons. Pressing the Forward push button com-
pletes the forward coil circuit from L1 to L2. Energizing coil F in turn energizes two
Rung 1
Rung 2
Rung 3R
CR1
G
PB1
CR1-1
CR1-2
CR1-3
PB2
L1 L2
Figure 1.12  Relay controlling two pilot lights.
M-1
M-2
M-3
L3
L2
L1
OLs Three-phase
motor
Mtr
Figure 1.13  High-power motor circuit.
01_Kamel_CH01_p001-040.indd 12 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 13
auxiliary contacts, F-1 and F-5. F-1 provides a latch around the forward push button
maintaining coil F energized. The normally closed contact F-5 will prevent the motor
from running in the reverse direction if the reverse PB is pressed before the stop PB
while the motor is running in the forward direction. The lower part of Figure 1.15 illus-
trates a line diagram of the magnetic reversing starter controlled by forward and reverse
push buttons.
Pressing the Reverse push button completes the reverse coil circuit from L1 to L2,
energizing coil R, which in turn energizes two auxiliary contacts, R-1 and R-5. R-1 pro-
vides a latch around the reverse push button, maintaining coil R energized. The nor-
mally closed contact R-5 will prevent the motor from running in the forward direction
if the reverse button is pressed before the stop while the motor is running in the reverse
direction.
Reversing the motor running direction is accomplished by switching two of the
motor input voltage phases, phase 1 and phase 3 in this case. When coil R energizes R-2,
R-3 and R-4 are closed; L1 connects to T3, L3 to T1, and L2 to T2 causing the motor to
run in the reverse direction.
Vertical gate control for downstream water level regulation is one such applica-
tion, which makes use of this motor-running-direction reversal. A desired increase in
Magnetic
starter
OLs
M
L2L1
Start
Stop
M-4
Figure 1.14  Low-power MCC starter circuit.
Electric
motor
T1
T2
T3
R-2
R-3
R-4
F-2
L2
L1
L3
F-3
F-4
OLs
Mtr
Control
relays
L2
OLs
F
R
R-5
F-1
R-1
Reverse
Forward
Stop
L1
F-5
Figure 1.15  Control of reversing motor starter.
01_Kamel_CH01_p001-040.indd 13 15/07/16 8:09 PM
14	 Chapter One
downstream water level requires running the motor in certain direction, which causes
the gate to move upward. Running the motor in the opposite direction will cause the
downstream water level to decrease. Movements in both directions are accomplished
by using a single motor. These motors are heavy-load, high-power devices/actuators
with widespread use in industrial process control and automation applications.
Typical cost for each such motor is high, and they come ready equipped with a mag-
netic starter with all needed instrumentation and protective gear, such as overloads
relay contacts.
1.2.5 Latch and Unlatch Control Relay
Latch and unlatch control relay work exactly like the Set Reset flip flop used in digital
logic design. Set is the latch coil and Reset is the unlatch coil. It is designed to maintain
the contact status when power is removed from the coil, as shown in Figure 1.16.
Figure 1.17 shows the line logic diagram for the latch and unlatch control relay.
O
FF
Set reset timing
diagram
L
L
U
U L
U
O
O
O'
0 0 Hold
0 1 0
1 0 1
1 1 Void
Figure 1.16  Latch and unlatch operation.
L1
L
Start
U
M
Stop
L1 L2
L
Figure 1.17  Latch/unlatch control line diagram.
01_Kamel_CH01_p001-040.indd 14 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 15
Once the Start push button is pressed, coil L receives power and energizes. After
Start PB is released, coil L does not receive power but maintains the energized status.
The L contact will close and cause motor M to run. To stop motor M, the Stop push but-
ton must be pressed to switch the status of the latch unlatch relay to the unlatch
status.
The Start and the Stop PB switches are interlocked through hard wiring. Either
action can be activated at any time but never both at the same time. The Start (latch) and
the Stop (unlatch) can be generated through program logic events instead of the two PB
switches shown, such as when the temperature in a chemical reactor exceeding certain
range or the level in a boiler drum is below certain threshold.
1.3  PLC’s Overview
This section is intended as a brief introduction to PLC, its history/evolution, hardware/
software architectures, and the advantages expected from its use relative to other avail-
able choices for process control and automation.
1.3.1  What Is a PLC?
A PLC is an industrial computer that receives inputs from input devices, then evalu-
ates these inputs in relation to stored program logic and generates outputs to control
peripheral output devices. The I/O modules and a PLC functional block diagram are
shown in Figure 1.18. Input devices are sampled and the corresponding PLC image
table is updated in real time. The user’s program, loaded in the PLC memory through
the programming device, resolves the predefined application logic and updates the
output internal logic table. Output devices are driven in real time according to the out-
put table updated values.
Standard interfaces for both input and output devices are available for the automa-
tion of any existing or new application. These interfaces are workable with all types of
PLCs regardless of the selected vendor. Sensors and actuators allow the PLC to inter-
face to all kinds of analog and ON/OFF devices through the use of digital I/O mod-
ules, analog-to-digital converters, digital-to-analog converters, and adequate isolation
Programming device
Output
devices
Input
devices
Input
image
table
Output
image
table
Data storage
User
program
PLC
Figure 1.18  Inputs/outputs PLC architecture.
01_Kamel_CH01_p001-040.indd 15 15/07/16 8:09 PM
16	 Chapter One
circuits. Apart the power supply input and the I/O interfaces, all signals inside the
PLC are digital and low voltage. Details of PLC hardware and interfaces will be dis-
cussed later in this book.
Since the first deployment of PLCs five decades ago, old and new vendors have
competed to produce more advanced and easier to use systems with associated
user-friendly development and communication tools. Figure 1.19 shows a variety of
popular PLCs used in the industry. You should notice the diversity in size and, obvi-
ously, associated capabilities, which not only allow cost accommodation but also
enable the design and implementation of complex distributed control systems. The
vast majority of available vendors allow the integration of other PLCs as part of a
networked distributed control system. It is also possible to implement extremely large
system control on one PLC system with a large number of interconnected chassis and
modules.
Wikipedia, the free encyclopedia, states that “a PLC or programmable controller is
a digital computer used for automation of electromechanical processes, such as control
of machinery on factory assembly lines, amusement rides, or light fixtures.” PLCs are
used in many industries and machines. Unlike general-purpose computers, a PLC is
designed for multiple inputs and output arrangements, extended temperature ranges,
immunity to electrical noise, and resistance to vibration and impact. Programs to con-
trol machine operation are typically stored in battery-backed-up or nonvolatile mem-
ory. A PLC is an example of a hardwired real-time system since output results must be
produced in response to input conditions within a bounded time, otherwise unintended
operation will result. Most of the electromechanical components needed for hardwired
control relay systems are completely eliminated resulting in great reduction in space,
power consumption, and maintenance requirements.
A PLC is a device that can replace the necessary sequential relay circuits needed for
process control. The PLC works by sampling its inputs and depending upon their state,
actuating its outputs to bring about desired changes in the controlled system. The user
Figure 1.19  Typical industrial PLCs.
01_Kamel_CH01_p001-040.indd 16 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 17
enters a program, usually via software that allows control systems to achieve the desired
results. Programs are typically written in ladder logic but higher-level development
environments are also available. The IEC 1131-3 standard (International Electrotechnical
Commission global standard for industrial control Programming) has tried to merge
PLC programming languages under one international standard. We now have PLCs that
are programmable in function block diagrams, instruction lists, C, and structured text—
all at the same time! Personal computers (PCs) are also being used to replace PLCs in
some applications.
PLCs are used in a vast majority of real-world applications. The evolution of the
globally competitive economy has mandated industries and organizations to commit
investments in digital process control and automation using PLCs. Wastewater treat-
ment, machining, packaging, robotics, material handling, automated assembly, or
countless other industries are extensively using PLCs. Those who are not using this
technology are wasting money, time, quality, and competitiveness. Almost all applica-
tions that use electric, mechanical, or hydraulic devices control have a need for a PLC.
For example, let’s assume that when a switch turns on we want to turn a solenoid
on for 15 seconds and then turn it off regardless of the duration of the switch on posi-
tion. We can accomplish this task with a simple external timer. What if our process
included 100 switches and solenoids? We would need 100 external timers to handle the
new requirements. What if the process also needed to count how many times the
switches turned ON individually? We have to employ a large number of external coun-
ters along with external timers. All this would require extensive wiring, energy, space,
and expensive maintenance requirements. As you can see, the bigger the process, the
more the need for a PLC. We can simply program the PLC to count its inputs and turn
the solenoids ON for the specified time.
1.3.2  History of PLCs
Prior to the introduction of PLCs, all production and process control tasks were imple-
mented using relay-based systems. Industrialists were dealing with this inflexible and
expensive control systems issues for decades. Upgrading a relay-based machine control
production system means that the whole production system changes, which is very
expensive and time consuming. In 1960s, General Motors (GM) issued a proposal for
the replacement of relay-based machines. The PLC history was all started with an
industrialist named Richard E. Morley, who was also one of the founders of Modicon
Corporation, in response to GM’s proposal. Morley finally created the first PLC in 1969.
It was sold in 1977 to Gould Electronics and was presented to GM. This first PLC is now
kept safely at the company headquarters.
plcdev.com lists the timeline shown in Figure 1.20 of the development of the PLC
by different manufacturers. It spans the period from 1968 to 2005. The new SLC500
was introduced by Rockwell Automation/Allen-Bradley in 1994. It was designed to
provide an easy-to-use and scalable infrastructure for small and large distributed con-
trol applications. Details of the SLC500 and associated interfaces—including hard-
ware, software, human machine interface (HMI)’s, communication, and networking,
along with Industrial Control application implementation using this Allen Bradley
infrastructure—will be the focus of this book. Reduction in size, lower cost, larger
capabilities, standard interfaces, open communication protocols, user-friendly devel-
opment environment, and human machine interface tools are the trend in the evolve-
ment of PLC, as shown in the history chart.
01_Kamel_CH01_p001-040.indd 17 15/07/16 8:09 PM
18	
Richard morley,
Bedfird associates
starts modicon
084 model
General Motors, hydra-matic division specifies design
for a “standard machine controller”
GM
Modicon
1971197019691968
AllenBradly
Allen Bradley acquires
Information Instruments
Purchase of Bunker Ramo’s
numerical controls division
First attempt at the PDQ II
Second attempt at the PMC
Richard Morley,
Bedford Associates
starts Modicon
084 model
Figure 1.20  1968 to 1971 early PLC systems**
.
First computer
terminal for
programming
General Electric’s
first programmable
controller, PC-45
First design of a
general purpose
programmable
controller—Logitrol
PLC patent
bulletin 1774
1978197719761975197419731972
Omron
Generalelectric
Others
Omron’s first PLC
sysmac-MIR
Becomes operating
division of Gould
Model 184
Models 284/384
PLC-2 (1771 I/O)
based on
intel 8080
Standard line of
Sysmac PLCs
using
microcomputers
Figure 1.20  1972 to 1978 first-generation PLC systems**
. (Continued)
01_Kamel_CH01_p001-040.indd 18 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 19
1982198119801979 Modbus network
communications
Data highway
network
PLC-3–based
on AMD
microprocessor
Series 6 PLC
Figure 1.20  1979 to 1982 early second-generation PLCs**
. (Continued)
Rockwell
international buys
Allen Bradley for
$1.651 billion
Model 984
Series 1 PLC
Series 3 PLC
Mitsubishi
A series
PLC debuts
Siemens
Simatic S5 PLC
General Electric
and Fanuc partner
to form GE Fanuc
automation
Sales hit $1 billion.
IBM compatible
programming
terminal
PLC-5 based on
Motorola 68000
1986198519841983
Figure 1.20  1983 to 1986 second-generation PLCs**
. (Continued)
01_Kamel_CH01_p001-040.indd 19 15/07/16 8:09 PM
20	 Chapter One
Series 5 PLC
Model 90-30
Model 90-70SLC500 small
processors
Profibus and
ethernet
capabilities
Quantum range of
automation control
Schneider Electric
purchases Modicon
Low-cost
networked
block I/O
Ethernet and
TCP/IP capabilities
DeviceNet
open network
Shipment of one
millionth PLC
AB merges with
ICOM to form
Rockwell Software
COM1
PLC Direct
founded as a
subsidiary of
Koyo Electronics
C200H
MicroLogix 1000
and flex I/O
19971996199519941993199219911990198919881987
Figure 1.20  1987 to 1997 early third-generation PLCs**
. (Continued)
01_Kamel_CH01_p001-040.indd 20 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 21
PLC’s history is displayed in time categories starting from the early systems intro-
duced from 1968 to 1971. This is followed by a span of six years, labeled as the first PLC
generation. The second generation started in 1979 and covered a period of seven years,
ending in 1986. This period showed greater number of vendors, mostly from existing
U.S. companies in addition to German and Japanese firms. The early third-generation
started 1987 and lasted for ten years, followed by a lasting period of continued growth
and advancement in both hardware and software tools, which led to a wide deploy-
ment of PLCs in most manufacturing automation and process control activities.
1.3.3  PLC Architecture
A typical PLC mainly consists of a CPU (central processing unit), power supply, mem-
ory, communication module, and appropriate circuits to handle I/O data. A PLC can be
viewed as an intelligent box having hundreds or thousands of separate relays, counters,
Figure 1.20  1998 to 2005 third-generation PLCs**
. (Continued)
**
PLC history chart (R. Morley, the father of PLC)
20052002200120001999199820042003
ControlLogix VersaMax
Series RX7i PLC
PAC system
Series RX3i PLC
PAC system
CS1
PLC Direct
changes its
name to
Automation
Direct
Mitsubishi Q
series PLC
debuts
01_Kamel_CH01_p001-040.indd 21 15/07/16 8:09 PM
22	 Chapter One
timers, and data storage locations. These counters, timers, and relays do not physically
exist but they are software-simulated internal entities. The internal relays are simulated
through bit locations in memory registers. Figure 1.21 shows a simplified block dia-
gram of a typical generic PLC hardware architecture.
PLC input modules are typically implemented using transistors and exist physi-
cally. They receive signals from external switches and sensors through contacts. These
modules allow the PLC to interface to and get a real-time sense of the process status.
Output modules are typically implemented using transistors and use TRIACs to switch
the connected power to the output coil when the output reference bit is true. They send
ON/OFF signals to external solenoids, lights, motors, and other devices. These mod-
ules allow the PLC to interface to and regulate, in real time, the controlled process.
Counters are software simulated and do not exist physically. They can be pro-
grammed to count up, down, or both up and down events/pulses. These simulated
counters are limited in their counting speed but suitable for most real-time applications.
Most PLC vendors provide high-speed counters modules that are hardware based and
can accommodate extremely fast events. Typical counters include UP-COUNTER,
DOWN-COUNTER, and UP/DOWN-COUNTERS. Timers are also software simulated
and do not exist physically. The most common types are the ON-DELAY, OFF-DELAY,
and RETENTIVE timers. Timing increments vary but are typically larger than one thou-
sands of a second. The vast majority of process control applications make extensive use
of timers and counters in a variety of ways and applications, which will be detailed in
Chapter 3.
Data storage is a high-speed memory/registers assigned to simply store data. They
are usually used in math or data manipulation as temporary storage. They also used to
store values associated with timers, counters, I/O signals, and user interface parame-
ters. Communication buffers and related networking and user interface tasks also make
use of high-speed storage. Typically, they can also be used to store data and programs
when power is removed from the PLC. Upon power-up the same contents, which
existed before power was removed, will still be available.
1.3.4  Hardwired System Replacement
As stated in the previous section, PLCs were introduced to replace hardwired relays. In
this section we will introduce the process of replacing the relay logic control by a PLC.
The example we will use to demonstrate this replacement process may not be very cost
Input
circuit
CPU
Memory
Output
circuit
Input
relays
Counters
Ouput
relays
Internal
utility
relays
Timers
Data
storage
Power
supply
Figure 1.21  PLC architecture.
01_Kamel_CH01_p001-040.indd 22 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 23
effective for the use of a PLC but it will demonstrate the fundamental concepts. As
shown earlier, the first step is to create the process ladder logic diagram/flow chart.
PLCs do not understand these schematic diagrams but most vendors provide software
to convert ladder logic diagrams into machine code, which shields users from actually
having to learn the PLC processor’s specific code. Still, we have to translate all process
logic into the standard symbols that the PLC recognizes. Terms like switch, solenoid,
relay, bell, motor, and other physical devices are not recognized by PLCs. Instead input,
output, coil, contact, timer, counter, and other terms are utilized.
Ladder logic diagrams use standard symbols and associated addresses to uniquely
represent different elements and events. Two vertical bars, representing L1
and L2
, span
the entire diagram and are called the power/voltage bus bars. All networks/rungs start
at the far left, L1
, and proceed to the right ending at L2
. Power flows from left to right
through available closed circuits. Inputs like switches are assigned the contact symbol
of a relay, as shown in Figure 1.22. Output like the bell is assigned the coil symbol of a
relay as shown in Figure 1.22. The ac/dc supply is an external power source and is thus
not shown in the ladder logic diagram. The PLC executes the logic and turns an output
ON or OFF using TRIAC switching interface without any regard to the physical device
connected to that output.
The PLC must know the location of each input, output, or other elements used in
our application. For example, where are the switch and the bell going to be physically
connected to the PLC? The PLC has pre-specified I/O addresses in a wide variety of
signal forms and sizes to interface with all types of devices. For now assume that our
input (a push button switch) will be labeled 0000 and the output (a bell) will be called
0500. The final step converts the schematic into a logical sequence of events telling the
PLC what to do when certain real-time events or conditions are satisfied. In our exam-
ple we obviously want the bell to sound while the push button switch is being pressed.
Electric power connection to the bell is made while the push button switch is being
pressed. Once the push button is released, electric power connection to the bell is
removed. The only requirement for this small system to work is to have the push button
connect to the PLC input module and for the bell to be wired to the PLC output module,
as will be shown later. Figure 1.23 shows the logic diagram for our simple example.
More real, comprehensive industrial control examples and extensive coverage will
illustrate this concept in Chapter 2.
Two vertical bars, representing L1
(the hot phase) and L2
(the neutral phase), span
the entire diagram and are called the power/voltage bus bars. All rungs start at the far
left, L1
, and proceed to the right ending at L2
. Power flows from left to right through
available closed circuits. Figure 1.24 and Figure 1.25 show the results of converting a
hardwired control relay to a PLC ladder logic control. The first example implements a
simple motor control using momentary START and STOP push buttons used to initiate
A contact symbol A coil symbol
Figure 1.22  Contact and coil symbols.
01_Kamel_CH01_p001-040.indd 23 15/07/16 8:09 PM
24	 Chapter One
0500
End
0000
Figure 1.23  Bell logic diagram.
L1 L2
Start
M
M
Stop
(a)
Stop Start
M
M
( )
(b)
Start
StartStop
( )
L2 L1
L1
Input
module
Output
module
M
M
M
L2
Stop
(c)
Figure 1.24  (a) Hardwired motor start/stop control relay; (b) motor start/stop PLC ladder logic
control; (c) motor start/stop PLC ladder logic in relation to I/O modules.
01_Kamel_CH01_p001-040.indd 24 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 25
or stop the motor—only in the Auto mode. The Start PB is a normally open contact,
which closes while the switch is pressed and opens when released. The Stop PB is a
normally closed contact, which opens while the switch is pressed and closes once
released. The second example shows a simple solenoid valve control using Start and
Stop momentary push buttons. The solenoid valve is activated once the Start PB is
pressed and deactivated through the Stop switch action.
1.3.5  PLC Ladder Logic
The PLCs use a ladder logic program, which is similar to the line diagram used in
hardwired relay control system. Figure 1.26 describes the control circuit for a ladder
logic program rung, which is composed of three basic sections: the signal, the decision,
Stop
L2L1
Start
CR1
CR1-1
CR1-2 SV1
(a)
Stop Start
SV1
SV1
( )
(b)
StartStop
( )
SV1
SV1
SV1
Start
L2 L1
L2
Output
module
Input
module
L1
Stop
(c)
Figure 1.25  (a) Hardwired solenoid valve relay control; (b) solenoid valve PLC ladder logic
control; (c) solenoid valve PLC ladder logic control in relation to I/O modules.
01_Kamel_CH01_p001-040.indd 25 15/07/16 8:09 PM
26	 Chapter One
and the action. The PLC input modules scan the input signals; the CPU executes the
ladder logic program in relation to the input status and makes a decision. The output
modules update and drive all output devices. The following sections show the I/O
terminal connection and describe the digital I/O addressing format.
As shown in Figure 1.27a, the input devices are connected to the input module
through the hot L1, while neutral is connected directly to the input module.
Figure 1.27b shows the outputs wired to the output terminal module, the outputs are
wired to the output terminal module, and the neutral L2 connected to the output
devices. The figure shows two digital inputs, a foot and pressure switches and two
outputs, a solenoid and a pilot light.
1.4  Manual/Auto Motor Control Operation
Figure 1.28 shows a manual/auto (M/A) control of a three-phase induction motor.
While the M/A switch held in the Manual position, pressing the Start push button ener-
gizes the magnetic motor starter, M. This Start PB is only for manual operation. Since
the Start push button is a normally open momentary switch, the power to the magnetic
starter is maintained through the latch with the auxiliary contact M1-1 around the Start
push button. When the M/A switch is placed in Auto position, the digital output mod-
ule receives the hot L1 through the Auto switch. When rung logic in the software for the
Decision ActionSignal
Figure 1.26  Ladder rung/network.
Input
module
Output
module
(a) Discrete input connection (b) Discrete output connection
L2
L1 L2
L1
Figure 1.27  Input/output terminal connection.
01_Kamel_CH01_p001-040.indd 26 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 27
output is true, switching of L1 occurs by the TRIAC switch inside the output module
and the magnetic starter is energized causing the motor to run. Notice that the manual
Start and Stop PBs have no effect on the automatic operation of the motor, they neither
can stop the motor nor jog it. Motor status can be monitored with normally open con-
tact M1-2 wired between the hot L1 and the digital input module in either of the two
modes of operation. The neutral is directly connected to the input module. The motor
overload conditions, which are typically deployed in the motor for protection and
safety operation, are combined and shown in the PLC wiring connection in Figure 1.28.
This safety and protection is part of the standard safety requirement for most industrial
motors, as defined in the Electrical National Code. Overloads can be caused by exces-
sive heat, current, or load among other factors.
1.5  SLC-500 LogixPro Simulator Setup
LogixPro 500 is an interactive Allen Bradley SLC 500 PLC educational tool based on the
ProSim-II simulation software. ProSim was developed to assist students in the acquisi-
tion of programming skills used in the control of process-oriented equipment and sys-
tems. Although designed primarily for use with PLCs, the flexible interface of the
ProSim package readily allows it to be used with any computer programming language
that supports ActiveX objects in a MS Windows environment.
1.5.1  The LogixPro 500 Screen
Typical industrial processes, such as material transfer operations using a conveyor or
batch mixing tanks complete with pumps and metering, are graphically displayed on
the screen. The displayed processes are fully animated and when used with a PLC or
M1
Start
M1-1
M1-2
AM
L1 L2Stop
OL’s
Output
module
Input
module
Figure 1.28  Manual/auto motor control PLC connection.
01_Kamel_CH01_p001-040.indd 27 15/07/16 8:09 PM
28	 Chapter One
PLC emulator, will respond to the signals of the PLC in the same manner as actual pro-
cess equipment and sensors would respond. For example, a properly addressed PLC
output can be used to start a pump on a mixing tank. Once started, visual indication of
the pump’s rotation and fluid flow will appear on the computer screen. In addition, a
digital signal representative of fluid flow would be transferred back as an input to the
PLC program. Figure 1.29 shows the LogixPro 500 main screen.
1.5.2  Editing Your Program
If you are familiar with Windows and know how to use a mouse, then you are going to
find LogixPro 500 editing a breeze. Both instructions and rungs are selected simply by
clicking on them with the left mouse button. Deleting is then just a matter of hitting the
Del key on your keyboard. Double clicking (two quick clicks) with the left mouse but-
ton allows you to edit an instruction’s address, while right clicking (right mouse but-
ton) displays a pop-up menu of related editing commands. Online help is also available
for quick reference.
1.5.3  Debugging Your Program
If you take a look at the PLC panel, you’ll notice an adjustable Speed Control. This is not
a component or a feature in normal PLCs, but is provided with LogixPro 500 so that you
may adjust the speed of the simulations to suit your particular computer. The simulator’s
adjustable speed panel does not show till you load and run the program. When the
simulation is slowed, so is the PLC scanning. You can use this effectively when trying
to debug your program. Set the scan slow enough and you can easily monitor how your
program’s instructions are responding. This capability may not be typical of real PLCs
but for training purposes, you will find that it is an invaluable debugging tool.
Figure 1.29  LogixPro 500 main screen.
01_Kamel_CH01_p001-040.indd 28 15/07/16 8:09 PM
Introduction to PLC Control Systems and Automation 	 29
1.5.4  RSLogix Documentation
Be sure to check out the entries listed under “RSLogix/LogixPro 500 Reference
Documents  Links” on the lower half of the LogixPro 500 Index page. Also, if you have
the space on your hard drive, then seriously consider installing the “AB SLC 500®
Instruction Set Reference Manual.”
1.5.5  I/O Simulator Screen
The I/O simulator screen shown in Figure 1.30 provides two discrete 16-bit inputs at
address I:1 and I:3, one 16-bit four-digit BCD input at address I:5 , two discrete 16-bit
outputs/coils at address O:2 and O:4, and one 16-bit four-digit BCD output display at
address O:6. Only discrete I/Os are accommodated under LogixPro 500 simulation.
Analog programming, debugging, and simulation will be discussed later using a sim-
ple hardware trainer and the AB SLC 500 software. The same trainer will be used to
perform HMI and PLC communication/networking tasks. Note: You can configure
inputs, by right-clicking on the switch, as push buttons being normally close/normally
open or Single Pole Single Through (SPST) being OPEN/CLOSE. The output light color
can be configured by right-clicking (red, green, and yellow). The LogixPro simulator
does not support real analog I/O programming. It also does not support floating point
Figure 1.30  Discrete I/O simulation screen.
01_Kamel_CH01_p001-040.indd 29 15/07/16 8:10 PM
30	 Chapter One
arithmetic, which is not supported by the phased out unsupported SLC5/01 and
SLC5/02 processors.
Every I/O is assigned a unique address according to its terminal position within the
I/O modules, which are assumed to be 16 points per module for the two discrete inputs
and the two discrete outputs modules. These addresses are fixed and cannot be changed.
Its configuration can be changed off line, while its status can be altered during program
execution in the online mode. The four-digit BCD simulator allows manipulation of the
input in BCD format. The display is also in BCD format. This often requires internal PLC
conversion of inputs from BCD to decimal binary and outputs from decimal binary to
BCD. Additional I/Os can be used in the program up to the limit defined for the target
processor used, but those I/O elements will not be accessible from the I/O simulation
panel. All I/O elements, along with other data used in your program, are accessible from
the project tree. Closing the I/O simulator will show the project tree and allow examina-
tion and manipulation of different program and data files as will be described next.
1.5.6  LogixPro 500 PLC Software
The LogixPro 500 software’s main screen has three parts: the project tree, the PLC
instructions panel, and the PLC control panel, as shown in Figure 1.31. You need to
close an open simulator in order to be able to access the project tree.
Figure 1.31  LogixPro 500 simulator main screen.
01_Kamel_CH01_p001-040.indd 30 15/07/16 8:10 PM
Introduction to PLC Control Systems and Automation 	 31
The project tree functions look and behave like Windows Explorer, with the follow-
ing main features:
•	 As with other Windows programs, a folder with plus (+) sign can be expanded
to show its contents.
•	 A folder with minus (−) sign can be collapsed to hide its contents.
•	 Using the window toolbar, you can perform the following:
•	 Open files
•	 Delete files
•	 Copy files
•	 Rename files
•	 Create new file
The size of the data files for the LogixPro 500 is less than the real RSLogix500 soft-
ware, which will be detailed in Chapter 2. The LogixPro 500 instruction panel also gives
limited coverage than the RSLogix 500; for example, advance instructions are not
included.
1.6 Process Control Choices
PLCs are not the only devices available for controlling a process or automating a sys-
tem. Control relays and PCs can be used to implement the same control. Each choice
may be of a benefit depending upon the control application. This debate has been going
on for a long time while the mix of technologies advanced at an incredible rate. With
continuing trend of PLC prices going down, size shrinking, and performance improv-
ing, the choice in favor of PLCs has become less of a debate. Still, system owners and
designers have to ask themselves if using a PLC is really an overkill for an intended
process control or automation application. Table 1.1 summarizes a brief comparison
between PLCs and control relays with important issues to be considered.
A dedicated controller is a single instrument that is dedicated to controlling
one process variable such as temperature for a heating control. They typically use
PID (proportional integral derivative) control and have the advantage of an all-in-
one package, typically with displays and buttons. These controllers can be an
excellent tool to use in simple applications. PLCs can compete functionally and
financially with these controllers, especially when several controllers are needed.
PLCs offer a greater degree of flexibility and can be programmed to handle existing
and future scenarios.
PCs can also be fitted with special hardware and software for use in process
control applications. PCs can provide advantage in certain control tasks relative to
PLCs, but their use is not as widespread as PLCs. A hybrid networked system of
PLCs and PCs is in wide use in large, distributed control applications. Table 1.2
shows a brief comparison between PLCs and PCs with important issues to be
considered.
01_Kamel_CH01_p001-040.indd 31 15/07/16 8:10 PM
32	 Chapter One
Chapter 1: Home Work Problems and Laboratory Projects
1)	Define the following:
a.	 Set point variable.
b.	Controlled variable.
c.	 Manipulated variable.
d.	Direct acting control.
e.	 Reverse acting control.
2)	What is the meaning of the word “process” in a chemical industry?
3)	Define What is an open-loop controller?
4)	What is the difference between the following:
a.	 Open- and closed-loop control
b.	Manual and automated control
c.	 Direct acting and reverse acting control
5)	List at least three advantages of PLC control over hardwired relay control.
Issue of PLC and
Control Relays
Comparison PLCs Control Relays
Control Logic
Changes
Changes in logic can easily be
implemented in software.
Changes require more complex
hardware modifications.
Deployment on
Different Systems
Easier to customize and
download software.
Requires construction of new
control panels.
Future Expansion New I/O modules, expansion
chassis, HMI’s, and software
patches can be added. Networked
control systems can be utilized.
Expansion is possible but at
higher cost.
Reliability PLCs are more robust and
redundancy is available.
Less reliable because of the use
of individual components.
Down time Troubleshooting/changes can be
made online with no downtime.
Changes or troubleshooting often
requires the system to go offline.
Space
Requirement
Space requirement rapidly
decreases as the number of
relays increase.
Huge space requirement for a
system with large number of
relays.
Data
Acquisition and
Communication
PLCs support data collection,
analysis, and communication.
Not directly or easily possible.
Maintenance and
Speed of Control
Less maintenance and faster
speed of control.
Mechanical parts require more
maintenance and reduce speed
of control.
Cost Effective cost and performance
for a wide range of process
control applications.
Can be cost effective for very
small systems.
Table 1.1  PLC and control relay comparison.
01_Kamel_CH01_p001-040.indd 32 15/07/16 8:10 PM
Introduction to PLC Control Systems and Automation 	 33
6)	Explain the advantages of using a logic diagram or flow chart in programming.
7)	Explain the steps used in implementing a single-variable, closed-loop control.
8)	Define the following:
a.	 Absolute error
b.	Error as a percent of set point
c.	 Error as a percent of range
9)	If an oven set point = 220°C, Measured value = 200°C, and Range = 200–250°C,
	 answer the following:
a.	 What is the absolute error?
b.	What is the error as a percent of set point?
c.	 What is the error as a percent of range?
d.	Repeat the above parts for a measured temperature value of 230°C assuming the
same set point and range.
Comparison Issues PLCs PCs
Environment PLCs are specifically designed
for harsh conditions with
electrical noise, magnetic fields,
vibration, extreme temperatures,
or humidity.
Common PCs are not designed
for harsh environments.
Industrial PCs are available but
at much higher cost.
Ease of Use By design, PLCs are friendlier
to technicians since they are
programmed in ladder logic and
have easy connections.
Operating systems like Windows,
UNIX, and Linux are common.
Connecting I/Os to the PC is not
always as easy.
Flexibility PLCs in rack format are easy
to exchange and expand. They
are designed for modularity and
expansion.
Typical PCs are limited by the
number of special cards they
can accommodate and are not
easily expandable.
Speed PLCs execute a single program
in sequential order and have
better ability to handle real-time
events.
PCs are designed to handle
multiple tasks. Real-time
operating systems can handle
real-time events.
Reliability A PLC rarely crashes over long
periods of time.
Chances of a PC locking up and
crashing are more.
Programming
Languages
PLCs languages used are
typically ladder logic, function
block, or structured text.
PCs are very flexible and
powerful in providing a wide
variety of programming tools.
Data Management Memory is limited in its ability to
store and analyze large data.
PCs excel in long-term data
storage, modeling, simulation,
and trending.
Cost Hard to compare pricing due to many variables, like I/O counts,
hardware needed, programming software, etc.
Table 1.2  PLC and PC control system comparison.
01_Kamel_CH01_p001-040.indd 33 15/07/16 8:10 PM
34	 Chapter One
10)	 Explain why the Electrical National Code demands users to control a motor’s start/
stop using normally open/normally close momentary push button switches instead
of maintain switches.
11)	 Explain the following:
a.	 The function of a process controller.
b.	The function of the final control element.
c.	 The main objectives of process control.
12)	 Study the circuit in Figure 1.32 and answer the following questions:
a.	 What logic gate type does the indicator represents?
b.	 What is the status (ON/OFF) of the indicator if push buttons A and B are pressed
and released one time?
c.	What is the status of the indicator if push buttons A and B are pressed and
maintained closed all the time?
d.	What is the status of the indicator if push button A or B is pressed at any one
time?
e.	 Show how you can modify the circuit to maintain the indicator status ON if push
button A or B is pressed and maintained closed.
f.	 Modify the circuit in Figure 1.32 to maintain the indicator ON once the two push
buttons are activated.
g.	Add a STOP push button to turn the indicator OFF and restart the process at any
time.
13)	Figure 1.33 shows a line diagram for an auto/manual motor control circuit. The
start/stop push buttons should start and stop the motor only if the Auto/Manual
switch is in Manual position. As shown in Figure 1.33, the circuit has error(s).
Perform the following:
a.	 Define the error(s).
b.	Redraw the circuit to correct the error.
14)	 Find and explain the status of CR1, M1, and SV1 in Figure 1.34 under the following
conditions:
a.	 PB1 is not pushed, and LS1 is open.
b.	PB1 is pushed, and LS1 is open.
c.	 PB1 is pushed, and LS1 is close.
A
L1 L2
CR1
CR2
CR2 IndicatorCR1
B
Figure 1.32  AND logic gate indicator.
01_Kamel_CH01_p001-040.indd 34 15/07/16 8:10 PM
Introduction to PLC Control Systems and Automation 	 35
15)	In some applications, such as motion control, machine tooling, and material
handling, the operator should be able to turn the motor on forward/reverse a few
seconds to move the load slightly in the forward or reverse direction. This type of
motor control is called jogging. Modify Figure 1.14 to include a run/jog switch.
16)	Using internet resources, write a two pages report summarizing the history and
evolution of PLC’s.
17)	 Figure 1.17 shows a latch/unlatch logic line diagram controlling a motor. Redraw
the line diagram to include interlock contacts in order to prevent the operator from
pushing the two push buttons (Start/Stop) simultaneously.
18)	 Process control logic can be implemented using relays, PLCs, or PCs. Construct a
comparison between the three options based on cost, scalability, and historical
developments / deployments. Use the internet to construct your research.
PB1
PB2
CR1
CR1-2 LS1
CR1-1
CR1-3
M1 Rung 2
Rung 1
Rung 3
SV1
L1 L2
Figure 1.34  Problem 14 wired control relay for motor and solenoid valve activation.
Stop
Start
OLs
M1
M
M1-1
M1-2
A
L2L1
Digital
output
module
Digital
input
module
Figure 1.33  Problem 13 incorrect auto/manual control.
01_Kamel_CH01_p001-040.indd 35 15/07/16 8:10 PM
36	 Chapter One
19)	Figure 1.35 shows a three-phase reversible (runs forward or reverse direction)
induction motor wiring and the associated relay logic diagram. Identify and correct
the wrong motor wiring and explain the reason for the rewiring.
Laboratory 1.1—LogixPro 500 Program Creation
The objective of this laboratory is to get users familiar with the LogixPro500 simulator
software. Use the following steps to create a ladder logic program in LogixPro 500:
•	 From the Simulation menu bar close the existing simulation and open the I/O
simulator.
•	 Open a new file and from select processor enter the processor type, as shown in
Figure 1.36.
Figure 1.36  I/O simulation panel in LogixPro 500.
L1
L1
L2
L3
OLs Electric
motor
Control
relays
OLs
L2
F
R
F-2
R-2
Forward
Stop
R-4
R-3
R-2
F-4
F-3
F-1
R-1
Reverse
F-2 T1
T2
T3
Mtr
Figure 1.35  Wiring and relay logic for problem 19.
01_Kamel_CH01_p001-040.indd 36 15/07/16 8:10 PM
Introduction to PLC Control Systems and Automation 	 37
•	 Collapse the I/O simulation screen back to its normal size by clicking on the
same (center) button you used to maximize the simulation’s window. You
should now be able to see both the simulation and program windows again. If
you wish, you can adjust the relative size of these windows by dragging the bar
that divides them with your mouse.
•	 Enter the single rung program shown in Figure 1.37, which consists of two
input instructions (XIC [Examine If Closed]), Examine If Open, and a single
output instruction (OTE [Output Energize]).
•	 Click on the XIC instruction with your left mouse button (left click), then drag
and drop to the input section of rung 0 and enter the address (I:1/0) or drag and
drop the address from the I/O simulator. Repeat for XIO address (I: 1/1) from
the I/O simulator as shown in Figure 1.38.
•	 Click on the OTE instruction with your left mouse button (left click), then drag
and drop to the output section rung 0 and enter the address (O:2/0) or drag and
drop the address as shown in the Figure 1.38.
•	 You can drag and drop addresses between ladder rungs.
•	 Right click on the XIC instruction and select “Edit Symbol” from the drop-down
menu that appears. Another textbox will appear where you can type in a name
(SS1), (SS2) to associate with these addresses, as shown in Figure 1.39. As before,
a click anywhere else will close the box.
Figure 1.37  One rung program in LogixPro 500.
Figure 1.38  Program creation in LogixPro 500.
01_Kamel_CH01_p001-040.indd 37 15/07/16 8:10 PM
38	 Chapter One
•	 Enter the address and symbol for the OTE instruction and your first RSLogix
program will now be complete. Before continuing however, double check that
the addresses of your instructions are correct.
Laboratory 1.2—Program Testing
It is now time to “Download” your program to the PLC. First click on the “Toggle”
button at the top right corner of the Edit panel, which will bring the PLC panel into
view, as shown in Figure 1.40.
Click on the “Download” button to initiate the downloading of your program
to the PLC. Once download is complete, click inside the “RUN” option selection circle
to start PLC scanning. The simulator screen shown in Figure 1.41 should now be in
view. For this laboratory we will be using the I/O simulator. Use your mouse to click
on I: 1/0 switch and note the change in the status color (yellow) of the terminal to
which the switch is connected to and the ladder rung inputs: Switch1, Switch2, and
output M1.
Figure 1.39  Editing tag symbols in LogixPro 500.
Figure 1.40  PLC panel.
01_Kamel_CH01_p001-040.indd 38 15/07/16 8:10 PM
Introduction to PLC Control Systems and Automation 	 39
Figure 1.41  LogixPro 500 simulator screen.
Laboratory 1.3—Converting Hardwired Control Relay to PLC Ladder Logic
Refer to Figure 1.34 and use the following I/O addresses to convert the hardwired con-
trol relay to a PLC ladder program:
Input Tag Name Output Tag Name
PB1 SS3 CR1 PL2
PB2 SS4 M1 PL3
LS1 SS5 SV1 PL4
Requirements:
•	 Assign the three required physical discrete input addresses from the Simulator
panel.
•	 Assign the three required physical discrete output addresses from the Simulator
panel.
01_Kamel_CH01_p001-040.indd 39 15/07/16 8:10 PM
40	 Chapter One
•	 Change the selector switches to the desired type and status.
•	 Change the discrete output indicators to three different colors.
•	 Program the ladder logics required.
•	 Download the program and perform the check out.
•	 Submit your reports with your comments on the laboratory.
01_Kamel_CH01_p001-040.indd 40 15/07/16 8:10 PM

More Related Content

PPTX
DCS fundamentals
PPTX
Open Loop and close loop control system ppt.pptx
PPT
STate Space Analysis
PDF
Transfer functions, poles and zeros.
PDF
PLC Programming Languages
PPT
Basic PLC
PPTX
Cascade control system
DCS fundamentals
Open Loop and close loop control system ppt.pptx
STate Space Analysis
Transfer functions, poles and zeros.
PLC Programming Languages
Basic PLC
Cascade control system

What's hot (20)

PPTX
Industrial Automation (PLC, SCADA & HMI) by Nilesh Jha
PPTX
Control system lectures
PDF
HMI- Human Machine Interface
PDF
PLC.pdf
PDF
PPTX
Chapter 1 introduction to control system
PDF
PID control dynamics of a robotic arm manipulator with two degrees of freedom.
PPT
PLC Basic
PDF
Mechatronics students manual 2013 reg updated
PPTX
Open and closed loop systems
PPT
DCS PRESENTATION
PPTX
Honeywell PLC ML-50 (MLM-DR16S)
PPTX
DCS - Distributed Control System
PPTX
Mathematical Modelling of Control Systems
PPTX
Working of DCS systems
PPTX
ppt on PLC automation
DOCX
Control systems
PPTX
Plc (programming)
PDF
Modern Control - Lec 01 - Introduction to Control System
PPT
Basic plc
Industrial Automation (PLC, SCADA & HMI) by Nilesh Jha
Control system lectures
HMI- Human Machine Interface
PLC.pdf
Chapter 1 introduction to control system
PID control dynamics of a robotic arm manipulator with two degrees of freedom.
PLC Basic
Mechatronics students manual 2013 reg updated
Open and closed loop systems
DCS PRESENTATION
Honeywell PLC ML-50 (MLM-DR16S)
DCS - Distributed Control System
Mathematical Modelling of Control Systems
Working of DCS systems
ppt on PLC automation
Control systems
Plc (programming)
Modern Control - Lec 01 - Introduction to Control System
Basic plc
Ad

Similar to PLC: Hands on PLC programing with RSLOGIX500 a and Logixpro (20)

PDF
Programmable Logic Controllers Industrial Control by Khaled Kamel, Eman Kamel...
PDF
Controladores lógicos programables Control Industrial por Eman Kamel y Khaled...
PDF
Plc report with project
PDF
Plc report
PDF
Mikroe465
PDF
Plc and scada report
PDF
PLC TECHNICIAN HANDBOOK beginners in automation
PDF
Plc report
PDF
PROGRAMMABLE LOGIC by Hites Khatri
PDF
Basic PLC Programming program The Fundamental Knowledge of PLC.pdf
PDF
Basic plc-programming
PDF
Basic plc-programming-e book_Reliance High Tech Ltd
PDF
PDF
PLC & SCADA
PDF
520com um001 -en-e
PDF
Manual guia power flex525
PDF
Moving to IBM PureFlex System x86-to-x86 Migration
PDF
Scada Supervisory Control And Data Acquisition 3rd Edition 3rd Stuart A Boyer...
Programmable Logic Controllers Industrial Control by Khaled Kamel, Eman Kamel...
Controladores lógicos programables Control Industrial por Eman Kamel y Khaled...
Plc report with project
Plc report
Mikroe465
Plc and scada report
PLC TECHNICIAN HANDBOOK beginners in automation
Plc report
PROGRAMMABLE LOGIC by Hites Khatri
Basic PLC Programming program The Fundamental Knowledge of PLC.pdf
Basic plc-programming
Basic plc-programming-e book_Reliance High Tech Ltd
PLC & SCADA
520com um001 -en-e
Manual guia power flex525
Moving to IBM PureFlex System x86-to-x86 Migration
Scada Supervisory Control And Data Acquisition 3rd Edition 3rd Stuart A Boyer...
Ad

More from SANTIAGO PABLO ALBERTO (20)

PDF
Electroneumatica con circuitos secueciales con logica cableada
PDF
Arduino Blocks: Programacion visual con bloques para arduino 2 Edicion por Ju...
PDF
Principios de electrónica 7 Edicion por Albert Malvino y David J. Bates
PDF
Principios digitales por Roger L. Tokheim
PDF
Solicitud de empleo para el trabajo para
DOCX
secuencia electroneumática parte 1
DOCX
secuencia electroneumática parte 2
PDF
Manual de teoría y practica electroneumática avanzada
PDF
Programacion de PLC basado en Rslogix 500 por Roni Domínguez
PDF
Programación de microcontroladores PIC en C con Fabio Pereira
PDF
Análisis y Diseño de Sistemas de Control Digital por Ricardo Fernandez del Bu...
PDF
Arduino: Arduino de cero a experto
PDF
PDF
Manual básico PLC OMRON
PDF
Programación de autómatas PLC OMRON CJ/CP1
PDF
Manual del sistema del controlador programable S7-200 SMART
PDF
Catálogo de PLC S7-200 SMART
PDF
PLC: Automatismos industriales
PDF
PLC: Buses industriales y de campo practicas de laboratorio por Jose Miguel R...
Electroneumatica con circuitos secueciales con logica cableada
Arduino Blocks: Programacion visual con bloques para arduino 2 Edicion por Ju...
Principios de electrónica 7 Edicion por Albert Malvino y David J. Bates
Principios digitales por Roger L. Tokheim
Solicitud de empleo para el trabajo para
secuencia electroneumática parte 1
secuencia electroneumática parte 2
Manual de teoría y practica electroneumática avanzada
Programacion de PLC basado en Rslogix 500 por Roni Domínguez
Programación de microcontroladores PIC en C con Fabio Pereira
Análisis y Diseño de Sistemas de Control Digital por Ricardo Fernandez del Bu...
Arduino: Arduino de cero a experto
Manual básico PLC OMRON
Programación de autómatas PLC OMRON CJ/CP1
Manual del sistema del controlador programable S7-200 SMART
Catálogo de PLC S7-200 SMART
PLC: Automatismos industriales
PLC: Buses industriales y de campo practicas de laboratorio por Jose Miguel R...

Recently uploaded (20)

PPT
Project quality management in manufacturing
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Digital Logic Computer Design lecture notes
PDF
composite construction of structures.pdf
DOCX
573137875-Attendance-Management-System-original
PPTX
OOP with Java - Java Introduction (Basics)
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
additive manufacturing of ss316l using mig welding
PDF
Well-logging-methods_new................
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Sustainable Sites - Green Building Construction
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
Project quality management in manufacturing
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Digital Logic Computer Design lecture notes
composite construction of structures.pdf
573137875-Attendance-Management-System-original
OOP with Java - Java Introduction (Basics)
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Geodesy 1.pptx...............................................
additive manufacturing of ss316l using mig welding
Well-logging-methods_new................
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Foundation to blockchain - A guide to Blockchain Tech
Automation-in-Manufacturing-Chapter-Introduction.pdf
R24 SURVEYING LAB MANUAL for civil enggi
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Sustainable Sites - Green Building Construction
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Model Code of Practice - Construction Work - 21102022 .pdf

PLC: Hands on PLC programing with RSLOGIX500 a and Logixpro

  • 2. Hands-On PLC Programming with RSLogix™ 500 and LogixPro® 00_Kamel_FM_i-xii.indd 1 15/07/16 6:56 PM
  • 3. The study of PLCs and computer control requires extensive hands-on experimentation and the use of hardware with possible physical access to high-voltage supply and devices. Users must take full precautions, be aware of safety requirements, and must not touch any of the power supply or hardware wiring at all time. About the Authors Dr. Eman Kamel holds a BS in electrical engineering from Cairo University, MS in electrical and computer engineering from the University of Cincinnati, and a Ph.D. in industrial engineering from University of Louisville. Dr. Eman had more than 20 years of experience in process automation at several companies, including Dow Chemical, GE Jet Engine, Philip Morris Co., VITOK Engineers, Evana Tools, and PLC Automation.  She designed and implemented PLC-based automation projects in several application areas, including tobacco manufacturing, chemical process control, wastewater treatment, plastic sheets processing, and irrigation water level control. She has extensive experience with Siemens and Allen-Bradley PLC programming, instrumentation, communication, and user interfaces. She has also used and developed good knowledge and experience with other types of PLCs, including GE, TI, Modicon, Telemechanic, Furnace, and Reliance. Eman developed customized and interactive PLC/computer control training for several applications. She has extensive computer-aided instruction experience and imple- mentation in the areas of PLCs, computer control, and automation at several universities. Dr. Khaled Kamel is currently a professor of computer science at Texas Southern University (TSU). He worked as full-time faculty and administrator at the Univer- sity of Louisville Engineering School, where he was a professor and the chair of the Computer Engineering and Computer Science department. He also worked as instrumentation engineer at GE Jet Engine. He served as the founding dean of the College of Information Technology at the United Arab Emirates University and the College of Computer Science & Information Technology at the Abu Dhabi University. Dr. Kamel received a BS in electrical engineering from Cairo Univer- sity, a BS in mathematics from Ain Shams University, MS in computer science from Waterloo University, and a Ph.D. in electronics and communication engi- neering from the University of Cincinnati.Dr. Kamel worked as principle investi- gator on several government and industry grants, which included the supervision of over 100 graduate research Master and Doctoral students over the past 25 years. His current research interest is more interdisciplinary in nature but focused in the areas of Industrial Control, Sensory Fusion, and Distributed Computing. 00_Kamel_FM_i-xii.indd 2 15/07/16 6:56 PM
  • 4. Hands-On PLC Programming with RSLogix™ 500 and LogixPro® Eman Kamel, Ph.D. Khaled Kamel, Ph.D. New York  Chicago  San Francisco  Athens London  Madrid  Mexico City  Milan   New Delhi  Singapore  Sydney  Toronto 00_Kamel_FM_i-xii.indd 3 15/07/16 6:56 PM
  • 5. Copyright © 2016 by McGraw-Hill Education. All rights reserved. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher. ISBN: 978-1-25-964435-1 MHID: 1-25-964435-9 The material in this eBook also appears in the print version of this title: ISBN: 978-1-25-964434-4, MHID: 1-25-964434-0. eBook conversion by codeMantra Version 1.0 All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trade- marked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringe- ment of the trademark. Where such designations appear in this book, they have been printed with initial caps. McGraw-Hill Education eBooks are available at special quantity discounts to use as premiums and sales promotions or for use in corporate training programs. To contact a representative, please visit the Contact Us page at www.mhprofessional.com. Information contained in this work has been obtained by McGraw-Hill Education from sources believed to be reliable. However, neither McGraw-Hill Education nor its authors guarantee the accuracy or completeness of any information published herein, and neither McGraw-Hill Education nor its authors shall be responsible for any errors, omissions, or damages arising out of use of this information. This work is published with the understanding that McGraw-Hill Education and its authors are supplying infor- mation but are not attempting to render engineering or other professional services. If such services are required, the assistance of an appropriate professional should be sought. TERMS OF USE This is a copyrighted work and McGraw-Hill Education and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill Education’s prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms. THE WORK IS PROVIDED “AS IS.” McGRAW-HILL EDUCATION AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUD- ING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill Education and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill Education nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill Education has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill Education and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise.
  • 6. Contents Preface  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi 1 Introduction to PLC Control Systems and Automation  . . . . . . . . . . . 1 1.1  Control System Overview  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1.1  Process Overview  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1.2  Manual Control Operation  . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1.3  Automated System Building Blocks  . . . . . . . . . . . . . . . . 5 1.1.4  Direct/Reverse Acting Controller  . . . . . . . . . . . . . . . . . . 7 1.2  Hardwired Systems Overview  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2.1  Conventional Relays  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2.2  Relay Logic System  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.2.3  Control Relay Application  . . . . . . . . . . . . . . . . . . . . . . . . 11 1.2.4  Motor Magnetic Starters  . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.2.5  Latch and Unlatch Control Relay  . . . . . . . . . . . . . . . . . . 14 1.3  PLC’s Overview  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.3.1  What Is a PLC?  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.3.2  History of PLCs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.3.3  PLC Architecture  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.3.4  Hardwired System Replacement  . . . . . . . . . . . . . . . . . . . 22 1.3.5  PLC Ladder Logic  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 1.4  Manual/Auto Motor Control Operation  . . . . . . . . . . . . . . . . . . . . . 26 1.5  SLC-500 LogixPro Simulator Setup  . . . . . . . . . . . . . . . . . . . . . . . . . 27 1.5.1  The LogixPro 500 Screen  . . . . . . . . . . . . . . . . . . . . . . . . . . 27 1.5.2  Editing Your Program  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 1.5.3  Debugging Your Program  . . . . . . . . . . . . . . . . . . . . . . . . 28 1.5.4  RSLogix Documentation  . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.5.5  I/O Simulator Screen  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.5.6  LogixPro 500 PLC Software  . . . . . . . . . . . . . . . . . . . . . . . 30 1.6  Process Control Choices  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Chapter 1: Home Work Problems and Laboratory Projects  . . . . . . . . . . 32 Laboratory 1.1—LogixPro 500 Program Creation  . . . . . . . . . . . 36 Laboratory 1.2—Program Testing  . . . . . . . . . . . . . . . . . . . . . . . . 38 Laboratory 1.3—Converting Hardwired Control Relay to PLC Ladder Logic   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2 Fundamentals of PLC Logic Programming  . . . . . . . . . . . . . . . . . . . . . . 41 2.1  PLC Hardware  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 2.1.1  SLC-500 Processor  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 2.1.2  Operating Modes of the CPU  . . . . . . . . . . . . . . . . . . . . . . 44 2.1.3  Communication Modules  . . . . . . . . . . . . . . . . . . . . . . . . . 45 2.1.4  Input/Output Modules  . . . . . . . . . . . . . . . . . . . . . . . . . . 45 v 00_Kamel_FM_i-xii.indd 5 15/07/16 6:56 PM
  • 7. vi C o n t e n t s 2.1.5  Power Supply  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 2.1.6  SLC-500 Memory Organization/Specifications  . . . . . . 46 2.1.7  Processor Memory Map and Program Organization  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 2.2  Ladder Logic Diagrams  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 2.2.1  PLC Input/Output Terminal Connection  . . . . . . . . . . . 50 2.2.2  PLC Boolean Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . 51 2.2.3  LogixPro 500 Data Files  . . . . . . . . . . . . . . . . . . . . . . . . . . 53 2.3  Combinational Logic  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 2.3.1  Logic Gate Operations  . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 2.3.2  LogixPro 500 Implementation Examples   . . . . . . . . . . . 59 2.3.3  I/O Testing Using the Force Function  . . . . . . . . . . . . . . 61 2.4  Combinational Word Logic Operations  . . . . . . . . . . . . . . . . . . . . . . 64 2.4.1  AND Word Logic Operation  . . . . . . . . . . . . . . . . . . . . . . 64 2.4.2  OR Word Logic Operation  . . . . . . . . . . . . . . . . . . . . . . . . 65 2.4.3  XOR Word Logic Operation  . . . . . . . . . . . . . . . . . . . . . . . 66 2.4.4  NOT Word Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 2.5  Latch, Unlatch, Subroutine, and One-Shot Instructions  . . . . . . . . 67 2.5.1  Latch and Unlatch Instructions  . . . . . . . . . . . . . . . . . . . . 68 2.5.2  Positive/Negative Edge One-Shot Instruction  . . . . . . . 68 2.5.3  File shift Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 2.5.4  JSR Instructions and Subroutine Nesting  . . . . . . . . . . . . 73 Chapter 2: Home Work Problems and Laboratory Projects  . . . . . . . . . . 78 Laboratory 2.1—Programming Combinational Logic   . . . . . . . 83 Laboratory 2.2—Basic Word Logic Operation Using Structured Programing   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Laboratory 2.3—Controlling a Conveyor Belt Using Latch and Unlatch Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Laboratory 2.4—Conveyor Belt Movement Directions  . . . . . . 87 3 Timers and Counters Programming  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 3.1  ON-Delay Timers  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 3.2  Generating a Pulse Timer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 3.3  OFF-Delay Timers  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 3.4  Retentive Timers-On-Delay  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 3.5  Fundamentals of Counters  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 3.5.1  Count-Up Counters   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 3.5.2  Count-Down Counters  . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Chapter 3: Home Work Problems and Laboratory Projects  . . . . . . . . . . 107 Laboratory 3.1—Merry-Go-Round  . . . . . . . . . . . . . . . . . . . . . . . 114 Laboratory 3.2—Machine Tool Operation  . . . . . . . . . . . . . . . . . 114 Laboratory 3.3—Pump Fail to Start Alarm  . . . . . . . . . . . . . . . . 116 Laboratory 3.4—Vertical Gate Monitoring  . . . . . . . . . . . . . . . . . 116 Laboratory 3.5—Cooling System Control  . . . . . . . . . . . . . . . . . 117 Laboratory 3.6—OFF-Delay Control of Three Motors  . . . . . . . 117 00_Kamel_FM_i-xii.indd 6 15/07/16 6:56 PM
  • 8. C o n t e n t s vii Laboratory 3.7—Pump Start/Stop Control for Predefined Calendar  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Laboratory 3.8—Conveyor System Control  . . . . . . . . . . . . . . . . 118 4 Math, Move, and Comparison Instructions  . . . . . . . . . . . . . . . . . . . . . . 121 4.1  Math Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 4.1.1  Numbering Systems  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 4.1.2  SLC-500 Data and Numbers Representation  . . . . . . . . . 123 4.1.3  Common Math Instructions  . . . . . . . . . . . . . . . . . . . . . . . 126 4.1.4  Advanced Math Instruction  . . . . . . . . . . . . . . . . . . . . . . . 133 4.1.5  Swap Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 4.1.6  Arithmetic Status Bits  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 4.2  Move and Transfer Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 4.2.1  Move Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 4.3  Comparison Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 4.3.1  Equal Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 4.3.2  Not Equal Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 4.3.3  Greater Than or Equal Instruction  . . . . . . . . . . . . . . . . . 139 4.3.4  Less Than or Equal Instruction  . . . . . . . . . . . . . . . . . . . . 142 4.3.5  Greater Than Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . 142 4.3.6  Less Than Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 4.3.7  Masked Move Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . 145 4.4  Program Control Instructions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 4.4.1  Jump Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 4.4.2  Subroutine Call  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 4.5  Implemented Industrial Application  . . . . . . . . . . . . . . . . . . . . . . . . 149 4.5.1  Common Process Control Tasks  . . . . . . . . . . . . . . . . . . . 151 4.5.2  Industrial Control Applications  . . . . . . . . . . . . . . . . . . . . 152 Chapter 4: Home Work Problems and Laboratory Projects  . . . . . . . . . . 158 Laboratory 4.1—Tank Alarm  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Laboratory 4.2—Feed Flow Digester Control  . . . . . . . . . . . . . . 165 Laboratory 4.3—Merry-Go-Round Using One Timer  . . . . . . . 166 Laboratory 4.4—Pumps Alternation Using Structured Programming  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Laboratory 4.5—Tank Fill/Refill  . . . . . . . . . . . . . . . . . . . . . . . . . 167 5 Human Machine Interface Design and Hardware Configuration  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 5.1  Allen-Bradley PLC Networking Options  . . . . . . . . . . . . . . . . . . . . . 172 5.2  PanelView Plus 600 Graphic Terminal  . . . . . . . . . . . . . . . . . . . . . . . 173 5.3  Door Control Simulator/Monitor  . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 5.4  Silo Conveyor Control Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 5.5  Single Batch Mode Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 5.6  One-Way Intersection Traffic Light Control  . . . . . . . . . . . . . . . . . . 191 5.7  Bottling Assembly Line Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 00_Kamel_FM_i-xii.indd 7 15/07/16 6:56 PM
  • 9. viii C o n t e n t s 5.8  PLC Trainer and Hardware Configuration  . . . . . . . . . . . . . . . . . . . 201 5.8.1  Book Training Unit Setup  . . . . . . . . . . . . . . . . . . . . . . . . . 201 5.8.2  RSLogix500 Software  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 5.8.3  RSLinx and Online Operation  . . . . . . . . . . . . . . . . . . . . . 204 5.8.4  Online Application Debugging  . . . . . . . . . . . . . . . . . . . . 207 Chapter 5: Home Work Problems and Laboratory Projects  . . . . . . . . . . 212 Laboratory 5.1—Garage Door Operation Control  . . . . . . . . . . 213 Laboratory 5.2—Flashing Light Indicators   . . . . . . . . . . . . . . . . 215 Laboratory 5.3—BCD I/O Simulator  . . . . . . . . . . . . . . . . . . . . . 216 Laboratory 5.4—Batch Process Auto/Manual Operation Modes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 Laboratory 5.5—Batch Process Chemical Reactor  . . . . . . . . . . 218 Laboratory 5.6—Structured Program for One-Way Traffic Lights Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 Laboratory 5.7—Batch Process Using ON-OFF Level Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 Laboratory 5.8—Conveyor Inspection Station Control  . . . . . . 220 Laboratory 5.9—Structured Programming for the Bottling Assembly line  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 6 Process Control Design and Troubleshooting  . . . . . . . . . . . . . . . . . . . . 225 6.1  Process Control Overview, Layer 1  . . . . . . . . . . . . . . . . . . . . . . . . . . 226 6.1.1  Process Descriptions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 6.1.2  Level of Control/Automation  . . . . . . . . . . . . . . . . . . . . . 227 6.1.3  Control System Components  . . . . . . . . . . . . . . . . . . . . . . 228 6.2  Process Control Implementation, Layer 2  . . . . . . . . . . . . . . . . . . . . 229 6.2.1  I/O List  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 6.2.2  Data Acquisition and Closed Loop Control Tasks  . . . . . 230 6.2.3  Project Logic Diagrams and Ladder Function Blocks  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 6.2.4  Control System Preliminary Documentation  . . . . . . . . 231 6.2.5  Program Documentation Using Cross Reference  . . . . . 232 6.3  Process Control Checkout and Startup, Layer 3  . . . . . . . . . . . . . . . 232 6.3.1  Debugging Using Find and Replace Function  . . . . . . . 234 6.3.2  Debugging Using Program Data File  . . . . . . . . . . . . . . . 234 6.3.3  Debugging Using Advance Diagnostic  . . . . . . . . . . . . . 235 6.3.4  Checkout Using Forcing Functions  . . . . . . . . . . . . . . . . . 235 6.3.5  Checkout Using Custom Data Monitors   . . . . . . . . . . . . 241 6.4  System Checkout and Troubleshooting  . . . . . . . . . . . . . . . . . . . . . . 242 6.4.1  Static Checkout  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 6.4.2  Wired Master Control Relay Safety Standards  . . . . . . . 244 6.4.3  Master Control Reset Instruction Control Zones  . . . . . 246 6.5  Safeguard Implementation Examples  . . . . . . . . . . . . . . . . . . . . . . . 248 Chapter 6: Home Work Problems and Laboratory Projects  . . . . . . . . . . 250 Laboratory 6.1—Conveyor System Control  . . . . . . . . . . . . . . . . 252 Laboratory 6.2—Irrigation Canal Sensors, Validation and Calibration  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 00_Kamel_FM_i-xii.indd 8 15/07/16 6:56 PM
  • 10. C o n t e n t s ix 7 Instrumentation and Process Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 7.1  Instrumentation Basics  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 7.1.1  Sensors Basics  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 7.1.2  Analog Sensors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 7.1.3  Digital Sensors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 7.2  Process Control Elements  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 7.2.1  Basic Measurement System  . . . . . . . . . . . . . . . . . . . . . . . 260 7.2.2  Process Control Variables  . . . . . . . . . . . . . . . . . . . . . . . . . 261 7.2.3  Signal Conditioning  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 7.2.4  Signal Transmitters  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 7.3  Signal Conversion  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 7.3.1  Analog-to-Digital Conversion  . . . . . . . . . . . . . . . . . . . . . 263 7.3.2  Digital-to-Analog Conversion  . . . . . . . . . . . . . . . . . . . . . 265 7.3.3  Quantification Errors and Resolution  . . . . . . . . . . . . . . . 266 7.4  Process Control System  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 7.4.1  Control Process  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 7.4.2  Controlled Variables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 7.4.3  Control Strategy and Types  . . . . . . . . . . . . . . . . . . . . . . . 269 7.4.4  Process Control Loop  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 7.4.5  Control System Error Quantification  . . . . . . . . . . . . . . . 272 7.4.6  Control System Transient and Performance Evaluation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 7.5  Closed-Loop Process Control Types  . . . . . . . . . . . . . . . . . . . . . . . . . 273 7.5.1  On/Off Control Mode  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 7.5.2  Proportional Control Mode  . . . . . . . . . . . . . . . . . . . . . . . 275 7.5.3  Composite Control Mode  . . . . . . . . . . . . . . . . . . . . . . . . . 277 7.5.4  PLC/Distributed Computer Supervisory Control  . . . . 277 Chapter 7: Home Work Problems and Laboratory Projects  . . . . . . . . . . 279 Laboratory 7.1—On/Off Temperature Control   . . . . . . . . . . . . 281 Laboratory 7.2—Tank Level and Flow Rate Monitoring  . . . . . 284 8 Analog Programming and Advanced Control  . . . . . . . . . . . . . . . . . . . . 285 8.1  Analog Input/Output Configuration and Programming  . . . . . . . 286 8.1.1  Analog Input/Output Modules  . . . . . . . . . . . . . . . . . . . 286 8.1.2  Configuring Analog Input/Output Modules  . . . . . . . . 286 8.1.3  Scale Instruction   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 8.1.4  NIO4V Composite Module Bit Addressing and Data Conversion  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 8.1.5  Analog Scaling and Mapping   . . . . . . . . . . . . . . . . . . . . . 292 8.2  PID Control Configuration and Programming  . . . . . . . . . . . . . . . . 296 8.2.1  Closed-Loop Control System  . . . . . . . . . . . . . . . . . . . . . . 296 8.2.2  Control System Time Response  . . . . . . . . . . . . . . . . . . . . 298 8.2.3  Control System Types  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 8.2.4  Controllers Behavior  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 8.2.5  Selection of the Suitable Controller Structures  . . . . . . . 304 00_Kamel_FM_i-xii.indd 9 15/07/16 6:56 PM
  • 11. x C o n t e n t s 8.3  PID Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 8.3.1  SLC-500 PID Control Block  . . . . . . . . . . . . . . . . . . . . . . . 306 8.3.2  SLC-500 Tank Level PID Control  . . . . . . . . . . . . . . . . . . . 310 8.4  PID Tuning  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 8.4.1  PID Closed-Loop Tuning  . . . . . . . . . . . . . . . . . . . . . . . . . 313 8.4.2  Manual Tuning  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 8.4.3  Ziegler-Nichols Method  . . . . . . . . . . . . . . . . . . . . . . . . . . 315 8.4.4  Cohen-Coon Tuning Method   . . . . . . . . . . . . . . . . . . . . . 315 8.4.5  PID Tuning Software  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 8.4.6  Integral Windup and PI Controllers  . . . . . . . . . . . . . . . . 317 Chapter 8: Home Work Problems and Laboratory Projects  . . . . . . . . . . 318 Laboratory 8.1—Tank Level Sensors Measurement Processing and Monitoring   . . . . . . . . . . . . . . . . . . . . . . . . . . 319 Laboratory 8.2—Validating and Monitoring Power Supply Voltage  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 Laboratory 8.3—Simple Closed-Loop PID Control  . . . . . . . . . 325 9 Comprehensive Case Studies  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 9.1  Irrigation Canal Water Level Control  . . . . . . . . . . . . . . . . . . . . . . . . 328 9.1.1  System I/O Map  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 9.1.2  Logic Diagrams  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 9.1.3  Automated System Building Blocks  . . . . . . . . . . . . . . . . 332 9.2  Irrigation Canal Ladder Implementation  . . . . . . . . . . . . . . . . . . . . 334 9.3  Wet Wells Pump Station Control  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 9.3.1  System I/O Map  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 9.3.2  Automated System Building Blocks  . . . . . . . . . . . . . . . . 347 9.4  Pumping Station Ladder Implementation  . . . . . . . . . . . . . . . . . . . . 348 9.4.1  Pump Alarms   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 Chapter 9: Home Work Problems and Laboratory Project  . . . . . . . . . . . 354 Laboratory 9.1—Conveyor System Speed Control Capstone Project  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 Odd-Numbered Home Work Problem Solutions  . . . . . . . . . . . . . . . . . 361 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 00_Kamel_FM_i-xii.indd 10 15/07/16 6:56 PM
  • 12. Preface T his book offers readers an introduction to PLC programming with focus on real industrial process automation applications. Rockwell Allen-Bradley SLC-500 PLC hardware configuration and the LogixPro 500 simulation software are described and used throughout the book. A small and inexpensive training setup with a power supply, processor, inputs/outputs discrete modules, analog inputs/outputs module, ON/OFF switches, push button switches, LEDs/light indicators, processor- integrated multiports communication ports, and a programing laptop was used to illustrate all programming concepts and the implementation of parts of completed automation projects by the authors in the past 20 years. All programming and project implementation in the first five chapters are described using the LogixPro 500 SLC- 500 PLC simulation software. PLC hardware setup or software is not needed for the LogixPro use, but you must have the LogixPro 500 simulation software installed on your computer/laptop. If you have access to a training unit or SLC-500 hardware, you can use the AB RSLogix software. Each chapter contains a set of homework questions and small laboratory design, programming, debugging, or maintenance projects. Two comprehensive capstone design projects are detailed at the end of this book in Chap. 9. All programs and system configurations described in chapters or included in the end of chapters homework assignments are fully implemented and tested. Complete solutions to all end-of-chap- ter laboratory assignments are available for instructors on request. Odd-numbered homework problem solutions are included in the book appendix. Concepts of process control and automation are introduced in Chap. 1. Chapter 2 details the fundamental of relay logic programming. It also covers the architecture and operation of PLCs. Configuration, operation, and the programming of timers and counters are the focus of our coverage in Chap. 3. Chapter 4 is dedicated to the coverage of mathematical, logic, and commonly used commands operations with an emphasis on their use in real-time industrial applica- tions. Ladder programming, for both PLC ladder logic and HMI user interface, are dis- cussed in detail in Chap. 5. Modular structured programming design is used with emphasis on industrial standers and safety. Coverage is specific to the Allen-Bradley SLC-500 processor and the LogixPro 500 software, but the concepts are applicable to other systems. System checkouts and troubleshooting are typically the most challenging and time- consuming tasks in industrial automation/process control applications. Chapter 6 con- tains common design and troubleshooting techniques. It also addresses critical issues xi 00_Kamel_FM_i-xii.indd 11 15/07/16 6:56 PM
  • 13. xii P r e f a c e of validation, hazards, safety standards, and protection against hardware/software failures or malfunction. Analog programming and associated instrumentation is cov- ered in Chap. 7. Configuration, interface, scaling, calibration, and associated user inter- face are briefly covered. Chapter 8 presents a comprehensive introduction to open- and closed-loop digital process control. Topics covered include sensors, actuators, on/off control, feedback control, PID tuning, and measures of good control. This chapter is intended to provide users with the understanding of the big picture of a control system in terms of system tasks, requirements, and overall expectations. It can best serve advanced engineering/ technology, CS, or IT students as a prerequisite to the fundamentals and hands-on activ- ities covered in the first seven chapters of the book. It can also serve other readers as a recap to the skills learned in previous chapters. The book concludes with a comprehensive case study in Chap. 9. The case details the specifications of an irrigation canal downstream water level control. Coverage pro- ceeds from the specification level to the final system design/implementation with asso- ciated documentation. The project is a small part of a much larger project implemented by the authors in Egypt more than 10 years ago. All implementations are redone using the AB SLC-500 PLC system. A second case study commonly used in waste water treat- ment facilities PLC control, wet wells pumping station, is briefly covered. Recent advances in industrial process control have produced more intelligent and compact PLC hardware as the one we adopted in this book, AB SLC-500 system. It has also made available an extremely user-friendly development software for structured ladder programming, communication, easier configuration, modular design, documen- tation, and overall system troubleshooting. These advancements have created many opportunities for challenging and rewarding careers in the areas of PLC technology and process automation. This book is intended for a senior-level, one-semester course in an academic setting with the expectation of weekly hands-on laboratory work outside the class. Chapters 1 through 5 can serve as the content for a one-quarter course with ade- quate laboratory time. The book can also be used for a two full-week’s industrial train- ing in a small group setting with adequate training setup for each user. Successful career opportunity in the demanding field of PLC control and automation requires acquisition of the skills in this book along with adequate hands-on experience. Eman Kamel, Ph.D. Senior Control Engineer PLC Automation Khaled Kamel, Ph.D. Professor, CS Department Texas Southern University 00_Kamel_FM_i-xii.indd 12 15/07/16 6:56 PM
  • 14. 1 CHAPTER 1 Introduction to PLC Control Systems and Automation T his chapter is an introduction to the world of programmable logic controllers (PLCs) and their evolution over the past fifty years as the top choice and the most dominant among all systems available for process control and automation applications. AG 170 kW hydropower generator built and installed in 1912. 01_Kamel_CH01_p001-040.indd 1 15/07/16 8:09 PM
  • 15. 2 Chapter One Chapter Objectives • Understand concepts of process control. • Realize the history of PLC and relay logic. • Understand PLC hardware architecture. • Understand the characteristics of hardwired and PLC systems. A programmable logic controller is a microprocessor-based computer unit that can per- form control functions of many types and varying levels of complexity. The first com- mercial PLC system was developed in the early 1970s to replace hardwired relay controls used in large manufacturing assembly plants. The initial use of PLCs covered automotive, jet engines, and large chemical plants. PLCs are used today in many tasks, including robotics, conveyor systems, manufacturing controls, process controls, electric power plants, wastewater treatment, and security applications. This chapter is an intro- duction to the world of PLCs and their evolution over the past fifty years as the top choice and the most dominant among all systems available for process control and automation applications. 1.1  Control System Overview A control system is a device or set of structures designed to manage, command, direct, or regulate the behavior of other devices or system. The entire control system can be viewed as a multivariable process having a number of inputs and outputs, which can affect the behavior of the process. Figure 1.1 shows this functional view of control sys- tems. This section is intended as a brief introduction, and will be covered in more detail in Chapter 7. 1.1.1 Process Overview In the industrial world, the word process refers to an interacting set of operations that lead to the manufacture or development of a product. In the chemical industry, it refers to the operations necessary to take an assemblage of raw materials and cause them to react in some prescribed fashion to produce a desired end product, such as gasoline. In the food industry, it means to take raw materials and operate on them in such a manner that an edible high-quality product results. In each use, and in all other cases in the process industries, the end product must have certain specified properties, which depend on the conditions of the reactions and operations that produce them. The word control is used to describe the steps necessary to ensure that the regulated conditions produce the correct properties in the product. Figure 1.1  Control systems—functional view. Inputs Outputs Multivariable process 01_Kamel_CH01_p001-040.indd 2 15/07/16 8:09 PM
  • 16. Introduction to PLC Control Systems and Automation 3 A process can be described by an equation. Suppose we let a product be defined by a set of properties: P1 , P2 , ..., and Pn . Each of these properties must have a certain value for the product to be correct. Examples of properties are color, density, chemical composition, and size. The process can be assumed to have m variables characteriz- ing its unique behavior. Some of these variables can also be categorized as input, output, process property, and internal or external system parameters. The following equations express a process property and a variable as a function of process variables and time. Pi = F (v1 , v2 , . . . vm , t) vi = G (v1 , v2 , . . . vm , t) where Pi = the ith process property vi = the ith process variable t = time To produce a product with the specified properties, some or all the m process vari- ables must be maintained at specific values in real time. Figure 1.2 shows free water flow through a tank, similar to rain flow in a home gutter system or a small creek. The tank acts in a way to slow the flow rate through the piping structure. The output flow rate is proportional to the water head in the tank. Water level inside the tank will rise as the input flow rate increases. At the same time output flow rate will increase with noticeable increase in the tank water level. Assuming a large enough tank, level stability will be reached when flow in is equal to flow out. This simple process has three primary variables: flow in, flow out, and tank level. All three variables can be measured and, if desired, can also be controlled. The tank level is said to be a self-regu- lated variable. Some of the variables in a process may exhibit the property of self-regulation, whereby they will naturally maintain a certain value under normal conditions. Small disturbances will not affect the tank level stability due to its self-regulating character- istic. A small increase in tank flow in will cause a slight increase in the water level. An increase in water level will cause an increase in the flow out, which will eventually produce a new stable tank level. Large disturbances in the tank input flow may force Flow in Flow out Figure 1.2  Water flow tank process. 01_Kamel_CH01_p001-040.indd 3 15/07/16 8:09 PM
  • 17. 4 Chapter One undesired changes in the tank level. Control of variables is necessary to maintain the properties of the product, the tank level in our example, within specification. In general, the value of a variable v actually depends on many other variables in the process and also on time. 1.1.2  Manual Control Operation In a manual control system, humans are involved in monitoring the process and mak- ing the decisions necessary to bring about desired changes in the process. Computers and advanced digital technologies may be used to automate a wide variety of process operation, status, command, and decision support functions. Sensors and measurement instruments are used to produce different process variables status, while final control elements or actuators are used to force changes in the process. As shown in Figure 1.3, humans close the control loop and establish the connection between measured values, desired conditions, and the needed activation of the final control elements. Manual control is widely available and can be effective for simple and small appli- cations. The initial cost of such systems might be relatively smaller than automated ones, but the long-term cost is typically much higher. It is difficult for operators to achieve the same control and quality due to various factors, such as different levels of domain expertise and unexpected changes in the process. The costs of operation and training can also become a burden unless certain functions are automated. Most sys- tems start by using manual control or existed previously through manual operation. As the system owners acquire and accumulate process control experience over time, they use this knowledge to make process improvements and eventually automate the con- trol system. The introduction of digital computers in the control loop has allowed the develop- ment of more flexible control systems, including higher-level functions and advanced algorithms. Furthermore, most current complex control systems can not be imple- mented without the application of digital hardware. However, the simple sequence of sensing, control, and actuation for the classic feedback control becomes more complex as well. A real-time system is one in which the correctness of a result depends not only on the logical correctness of the calculation but also on the time at which the different Load disturbance Process Final control element Measuring element SP Figure 1.3  Manual control systems. 01_Kamel_CH01_p001-040.indd 4 15/07/16 8:09 PM
  • 18. Introduction to PLC Control Systems and Automation 5 tasks are executed. Time is one of the most important entities of the system, and there are timing constraints associated with systems tasks. Such tasks normally have to con- trol or react to events that take place in the outside world, which are happening in “real time.” Thus, a real-time task must be able to keep up with the external events with which it is concerned. Figure 1.4 shows a simple manual control system. The level in the tank varies as a function of the flow rate through the input valve and the flow rate through the output valve. The level is the control or controlled variable, which can be measured and regulated through valve control and adjustment at the input or the output flow or both. The two valves can be motorized and activated from an easy-to-use operator interface. Valve position variations are achieved through an operator input based on observed process real-time conditions. We will see next that the operator can easily be eliminated. 1.1.3  Automated System Building Blocks The closed control loop shown in Figure 1.5 consists of the following five blocks: • Process • Measurement • Error detector • Controller • Control element In manual control, the operator is expected to perform the task of error detection and control. Observations and actions taken by operators can lack both consistency and reli- ability. The limitation of manual control can be eliminated through the implementa- tion of closed-loop systems and the associated process control strategies. Details of such Flow in Flow out Figure 1.4  Tank level manual controls. 01_Kamel_CH01_p001-040.indd 5 15/07/16 8:09 PM
  • 19. 6 Chapter One strategies will be detailed in Chapter 7. Figure 1.5 shows a block diagram of a single- variable closed-loop control. The controller can be implemented using various tech- nologies, including hardwired relay circuits, digital computers, and more often the PLC systems. It is impossible to achieve perfect control, but in the real world it is not needed. We can always live with small errors within our acceptable quality range. An oven with a desired temperature of 500°F can achieve the same results at 499.99°F. In most cases we are limited by the precision and cost of the actual sensors. There is no good justification for spending more money to achieve unwanted/unnecessary gains in precision. Errors in real time are used to judge the quality of the system design and its associ- ated controller. The errors can be measured in three ways as explained below using the following definitions: Absolute error = set point − measured value Error as percentage of set point = absolute error/set point * 100 Error as percentage of range = absolute error/range * 100 Range = maximum value − minimum value Errors are commonly expressed as percentage of range and occasionally as percent of set point but rarely as an absolute value. Also, most process variables are commonly also quantified as percentage of the defined range. This quantification allows for uni- versal input/output (I/O) PLC computer interfaces regardless of the physical nature of the sensory and actuating devices. A PLC analog input module having several input slots can accommodate and process temperature, pressure, motor speed, viscosity, and many other measurements in exactly the same way. Later chapters will detail the PLC hardware and software as applied to real-world industrial control applications. Even though the implementation focus will be on the AB SLC 500, the concepts covered will apply to other PLCs with no or very little modifications. International standards and the success of open system architectures are the main reasons for the universal nature of today’s PLC technology and its compatibility. SP Final control element Process Upset, or load disturbance Controller Measuring element Figure 1.5  Closed-loop control. 01_Kamel_CH01_p001-040.indd 6 15/07/16 8:09 PM
  • 20. Introduction to PLC Control Systems and Automation 7 1.1.4  Direct/Reverse Acting Controller The controller can be designed to provide an output that is either directly propor- tional to the amount of error in the process or inversely proportional to the error. This type of controller behavior is labeled as direct and reverse action, respectively. We will demonstrate this concept using the liquid tank of Figure 1.4 for a level control process. The error in level is expressed as the difference between the set point and the measured value. The following are the two possible control strategies based on the error value: • Direct acting: In this control strategy, we regulate the tank level by adjusting the position of the inlet valve while keeping the outlet valve position fixed. If the error is positive (set point larger than the measured value), then the controller output (inlet valve position) will increase. This will allow more flow into the tank and will cause the level to increase, which in turn will reduce the process error. The behavior of the controller in this case is known as direct acting. • Reverse acting: In this control strategy, the level is regulated by adjusting the position of the outlet valve while keeping the inlet valve position fixed. If the error is positive (set point greater than the measured value), then the controller output (outlet valve position) will decrease. This will allow less flow out of the tank and will cause the level to increase, which in turn will reduce the process error. The behavior of the controller in this case is known as reverse acting. 1.2  Hardwired Systems Overview Prior to the widespread use of PLCs in process control and automation, hardwired relay control systems or analog single-loop controllers were used. This section will briefly introduce relay systems and the logic used in process control. It is important that the reader understands the fundamentals of relays in order to fully appreciate the role of PLCs in replacing relays, simplifying process control design/implementation, and enhancing process quality at a much lower overall system cost. Coverage in this section is limited to functionality and application without much detail of either electrical or mechanical characteristics. 1.2.1  Conventional Relays In this section we will learn how a relay actually works. A relay is an electromagnetic switch having a coil and a set of associated contacts of a typical relay, as shown in Figure 1.6. Contacts can be either normally open or normally closed. An electromag- netic field is generated once voltage is applied to the coil. This electromagnetic field generates a force that pulls the contacts of the relay, causing them to make or break the controlled external circuit connection. These electrically actuated devices are used in automobiles and industrial applications to control whether a high-power device is switched ON or OFF. While it is possible to have a device, such as a large industrial motor or ignition system, directly powered by an electrical circuit without the use of a relay, such choice is neither safe nor practical. For example, in a factory, a motor control may be placed far away from the high-voltage electrical motor and its power source for safety reasons. In this case, it is more practical to have a low-power elec- trical relay coil circuit control a high-power relay contacts than to directly wire a 01_Kamel_CH01_p001-040.indd 7 15/07/16 8:09 PM
  • 21. 8 Chapter One high-power electrical switch from the control area to the motor and its independent power supply. Figure 1.7 shows a control relay (CR1) with two contacts normally open (CR1-1) and normally closed (CR1-2). On the left side of the figure, power is not applied to the coil (CR1) and the two contacts are in the normal state. On the right side of the same figure, power is applied to the coil and the two contacts switch state; the normally open contact closes and the normally closed contact opens. Figure 1.8 shows a simple relay circuit for controlling a bell using a single pole single through (SPST) switch; pressing the switch causes the bell to sound. A relay is typically used to control a device that requires high voltage or draws large current. Figure 1.6  Typical industrial relays. No power CR1-1 CR1-1 CR1 CR1-2 CR1-2 Power CR1CR1 Figure 1.7  Relay with two contacts normally open and normally closed. 01_Kamel_CH01_p001-040.indd 8 15/07/16 8:09 PM
  • 22. Introduction to PLC Control Systems and Automation 9 The relay allows full power to the device without needing a mechanical switch that can carry the high current. A switch is normally used to control the low-power side, the relay coil side. Notice that we have two separate circuits: the bottom uses the dc low power, while the top utilizes the ac high power. The two circuits are only con- nected through electromagnetic field coupling. The low-power dc side is connected to the coil while the high-power ac side in this example is located in the field away from the control room. The two sides are normally powered from two independent sources in a typical industrial facility automated application. Of course it is not cost effective to replace the relay in this example with a PLC, but it does for a real application with hundreds or thousands of I/O devices. 1.2.2  Relay Logic System Relay logic systems are control structures appropriate for both industrial and municipal applications. The operations/processes that will be controlled by relay logic systems are hardwired, unlike programmable logic control systems. These systems are inflexible and can be difficult to modify after deployment. Since the operation of relay logic con- trollers is built directly into the device, it is easy to troubleshoot the system should any problems arise. Such control systems are developed with fixed features for specific applications. Typically, large pumps and motors will be equipped with hardwired relay control to protect them against damage under overloads and other undesired working conditions. Programmable logic control systems provide much—needed flexibility and allow for future continuous quality improvements in the process. Figure 1.9 shows two relay circuits for implementing two inputs “AND” and “OR” logic functions, respectively. Each relay has two magnetic coils and associated normally closed (NC) contacts. The two inputs are connected to one side of each of the two coils and the other end of the coil is connected to the ground. The contacts are connected in a predefined manner to produce the desired output as a function of the two inputs. Input A and Input B can be at either the Ground level (0/Low logic/False logic) or the +V level (1/High logic/True logic). The AND arrangement produces the +V logic (High logic) only when the two inputs are high while the OR configuration produces the Ground logic (Low logic) only when the two inputs are low. Notice that the relay opera- tion involves electrical (coils and power supply) and mechanical (moving contacts) components. Schematic diagrams for relay logic circuits are often called logic diagrams. A relay logic circuit is an electrical diagram consisting of lines/networks/rungs in which each Bell DC Switch Contact Coil Relay AC Figure 1.8  Simple relay circuit. 01_Kamel_CH01_p001-040.indd 9 15/07/16 8:09 PM
  • 23. 10 Chapter One must have continuity to enable the intended output device. A typical circuit consists of a number of rungs, with each controlling an output. This output is controlled through a combination of input or output conditions (such as switches and control relays) con- nected in series, parallel, or series-parallel to obtain the desired logic to drive the out- put. Relay logic diagrams represent the physical interconnection of devices. It is possible to design a relay logic diagram directly from the narrative description of a process control event sequence. In ladder logic diagrams, an electromechanical relay coil is shown as a circle and the contacts actuated by the coil as two parallel lines. Given this notation, the relay line logic diagrams for AND and OR logic functions are shown in Figure 1.10. The “L1 ” and “L2 ” designations in the logic diagram refer to the two poles of a 120 ac voltage power supply. L1 is the hot side of the supply and L2 is the ground/neutral side. Output devices are always connected to L2 . Any device overloads that are to be +V +V+V +V Input A Input B Input B Input A Output Output (a) (b) Figure 1.9  (a) AND logic function; (b) OR logic function. CR1 CR2 IndicatorCR1 IndicatorCR1CR2 CR2 A CR1 CR2 A L1 L1 L2 L2 B B Indicator A or B Indicator A and B Figure 1.10  Relay line logic diagrams. 01_Kamel_CH01_p001-040.indd 10 15/07/16 8:09 PM
  • 24. Introduction to PLC Control Systems and Automation 11 included must be shown between the output device and L2 ; otherwise the output device must be the last component before L2 . Input devices are always shown between L1 and the output device. Relay contacts control devices may be connected either in series, parallel, or a combination of both. 1.2.3  Control Relay Application Relays are widely used in process control and automation applications. PLCs have gained much acceptance in the last thirty years and have gradually replaced most of the old, hardwired relay-based control systems. It is important that we understand the old relay control systems in order to appreciate and make the transition to the more power- ful, easier to implement, cheaper to maintain, and reliable PLC control. This section documents two simple relay control applications. Figure 1.11 shows the line diagram for a common application of an electromechani- cal relay DC motor control circuitry. A momentary normally open (NO) push button switch starts the motor and another normally closed (NC) push button switch-stops the motor. The control relay contact is used to latch the start push button after it is released. Another contact associated with the same relay is used to start the motor. Pressing the stop push button at any time will interrupt the flow of electricity supply to the motor and cause it to stop. Another application is shown in Figure 1.12. The line diagram illustrates how a three-contact relay is used to control two pilot lights. The desired control is accom- plished using two push button switches; PB1 starts the operation and PB2 terminates it at any time. Below are the critical steps for this example: • With no power applied to the control relay the contacts are in normal state. The normally open is open and the normally close is close. The green pilot light (G) receives power and turns ON as indicated by the green fill light. The red pilot light (R) is OFF, as shown. • Rung 1: Once PB1 is pressed, CR1 coil becomes energized; this in turn makes contact. CR1-1 closes and maintains power to CR1 through the normally closed push button PB2. Start CR1-1 CR1-2 CR1 Mtr Stop Figure 1.11  DC motor controls. 01_Kamel_CH01_p001-040.indd 11 15/07/16 8:09 PM
  • 25. 12 Chapter One • When CR1 energizes the contacts switch state, the normally open closes and the normally close opens. This will turn OFF the green light in rung 2 and turn ON the red light on rung 3. • When the PB2 push button is pressed, the control relay loses power and the contacts switch to the normal state. This results in turning the green light ON and the red light OFF. 1.2.4  Motor Magnetic Starters A magnetic starter is used to control high power to a motor, as shown in Figure 1.13. Three of the motor magnetic starter contacts are used to connect the three phases of the high voltage supply. In addition, overload relays are physically attached in series with the three-phase supply voltage (L1, L2, and L3) for the motor’s protection. Figure 1.14 shows a low-power motor starter circuit at the Motor Control Center (MCC). START and STOP PB switches start and stop the motor through the control of its magnetic starter. The magnetic starter contact M-4 is used to latch the motor start action. Figure 1.15 illustrates a line diagram of a magnetic reversing motor starter con- trolled by forward and reverse push buttons. Pressing the Forward push button com- pletes the forward coil circuit from L1 to L2. Energizing coil F in turn energizes two Rung 1 Rung 2 Rung 3R CR1 G PB1 CR1-1 CR1-2 CR1-3 PB2 L1 L2 Figure 1.12  Relay controlling two pilot lights. M-1 M-2 M-3 L3 L2 L1 OLs Three-phase motor Mtr Figure 1.13  High-power motor circuit. 01_Kamel_CH01_p001-040.indd 12 15/07/16 8:09 PM
  • 26. Introduction to PLC Control Systems and Automation 13 auxiliary contacts, F-1 and F-5. F-1 provides a latch around the forward push button maintaining coil F energized. The normally closed contact F-5 will prevent the motor from running in the reverse direction if the reverse PB is pressed before the stop PB while the motor is running in the forward direction. The lower part of Figure 1.15 illus- trates a line diagram of the magnetic reversing starter controlled by forward and reverse push buttons. Pressing the Reverse push button completes the reverse coil circuit from L1 to L2, energizing coil R, which in turn energizes two auxiliary contacts, R-1 and R-5. R-1 pro- vides a latch around the reverse push button, maintaining coil R energized. The nor- mally closed contact R-5 will prevent the motor from running in the forward direction if the reverse button is pressed before the stop while the motor is running in the reverse direction. Reversing the motor running direction is accomplished by switching two of the motor input voltage phases, phase 1 and phase 3 in this case. When coil R energizes R-2, R-3 and R-4 are closed; L1 connects to T3, L3 to T1, and L2 to T2 causing the motor to run in the reverse direction. Vertical gate control for downstream water level regulation is one such applica- tion, which makes use of this motor-running-direction reversal. A desired increase in Magnetic starter OLs M L2L1 Start Stop M-4 Figure 1.14  Low-power MCC starter circuit. Electric motor T1 T2 T3 R-2 R-3 R-4 F-2 L2 L1 L3 F-3 F-4 OLs Mtr Control relays L2 OLs F R R-5 F-1 R-1 Reverse Forward Stop L1 F-5 Figure 1.15  Control of reversing motor starter. 01_Kamel_CH01_p001-040.indd 13 15/07/16 8:09 PM
  • 27. 14 Chapter One downstream water level requires running the motor in certain direction, which causes the gate to move upward. Running the motor in the opposite direction will cause the downstream water level to decrease. Movements in both directions are accomplished by using a single motor. These motors are heavy-load, high-power devices/actuators with widespread use in industrial process control and automation applications. Typical cost for each such motor is high, and they come ready equipped with a mag- netic starter with all needed instrumentation and protective gear, such as overloads relay contacts. 1.2.5 Latch and Unlatch Control Relay Latch and unlatch control relay work exactly like the Set Reset flip flop used in digital logic design. Set is the latch coil and Reset is the unlatch coil. It is designed to maintain the contact status when power is removed from the coil, as shown in Figure 1.16. Figure 1.17 shows the line logic diagram for the latch and unlatch control relay. O FF Set reset timing diagram L L U U L U O O O' 0 0 Hold 0 1 0 1 0 1 1 1 Void Figure 1.16  Latch and unlatch operation. L1 L Start U M Stop L1 L2 L Figure 1.17  Latch/unlatch control line diagram. 01_Kamel_CH01_p001-040.indd 14 15/07/16 8:09 PM
  • 28. Introduction to PLC Control Systems and Automation 15 Once the Start push button is pressed, coil L receives power and energizes. After Start PB is released, coil L does not receive power but maintains the energized status. The L contact will close and cause motor M to run. To stop motor M, the Stop push but- ton must be pressed to switch the status of the latch unlatch relay to the unlatch status. The Start and the Stop PB switches are interlocked through hard wiring. Either action can be activated at any time but never both at the same time. The Start (latch) and the Stop (unlatch) can be generated through program logic events instead of the two PB switches shown, such as when the temperature in a chemical reactor exceeding certain range or the level in a boiler drum is below certain threshold. 1.3  PLC’s Overview This section is intended as a brief introduction to PLC, its history/evolution, hardware/ software architectures, and the advantages expected from its use relative to other avail- able choices for process control and automation. 1.3.1  What Is a PLC? A PLC is an industrial computer that receives inputs from input devices, then evalu- ates these inputs in relation to stored program logic and generates outputs to control peripheral output devices. The I/O modules and a PLC functional block diagram are shown in Figure 1.18. Input devices are sampled and the corresponding PLC image table is updated in real time. The user’s program, loaded in the PLC memory through the programming device, resolves the predefined application logic and updates the output internal logic table. Output devices are driven in real time according to the out- put table updated values. Standard interfaces for both input and output devices are available for the automa- tion of any existing or new application. These interfaces are workable with all types of PLCs regardless of the selected vendor. Sensors and actuators allow the PLC to inter- face to all kinds of analog and ON/OFF devices through the use of digital I/O mod- ules, analog-to-digital converters, digital-to-analog converters, and adequate isolation Programming device Output devices Input devices Input image table Output image table Data storage User program PLC Figure 1.18  Inputs/outputs PLC architecture. 01_Kamel_CH01_p001-040.indd 15 15/07/16 8:09 PM
  • 29. 16 Chapter One circuits. Apart the power supply input and the I/O interfaces, all signals inside the PLC are digital and low voltage. Details of PLC hardware and interfaces will be dis- cussed later in this book. Since the first deployment of PLCs five decades ago, old and new vendors have competed to produce more advanced and easier to use systems with associated user-friendly development and communication tools. Figure 1.19 shows a variety of popular PLCs used in the industry. You should notice the diversity in size and, obvi- ously, associated capabilities, which not only allow cost accommodation but also enable the design and implementation of complex distributed control systems. The vast majority of available vendors allow the integration of other PLCs as part of a networked distributed control system. It is also possible to implement extremely large system control on one PLC system with a large number of interconnected chassis and modules. Wikipedia, the free encyclopedia, states that “a PLC or programmable controller is a digital computer used for automation of electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or light fixtures.” PLCs are used in many industries and machines. Unlike general-purpose computers, a PLC is designed for multiple inputs and output arrangements, extended temperature ranges, immunity to electrical noise, and resistance to vibration and impact. Programs to con- trol machine operation are typically stored in battery-backed-up or nonvolatile mem- ory. A PLC is an example of a hardwired real-time system since output results must be produced in response to input conditions within a bounded time, otherwise unintended operation will result. Most of the electromechanical components needed for hardwired control relay systems are completely eliminated resulting in great reduction in space, power consumption, and maintenance requirements. A PLC is a device that can replace the necessary sequential relay circuits needed for process control. The PLC works by sampling its inputs and depending upon their state, actuating its outputs to bring about desired changes in the controlled system. The user Figure 1.19  Typical industrial PLCs. 01_Kamel_CH01_p001-040.indd 16 15/07/16 8:09 PM
  • 30. Introduction to PLC Control Systems and Automation 17 enters a program, usually via software that allows control systems to achieve the desired results. Programs are typically written in ladder logic but higher-level development environments are also available. The IEC 1131-3 standard (International Electrotechnical Commission global standard for industrial control Programming) has tried to merge PLC programming languages under one international standard. We now have PLCs that are programmable in function block diagrams, instruction lists, C, and structured text— all at the same time! Personal computers (PCs) are also being used to replace PLCs in some applications. PLCs are used in a vast majority of real-world applications. The evolution of the globally competitive economy has mandated industries and organizations to commit investments in digital process control and automation using PLCs. Wastewater treat- ment, machining, packaging, robotics, material handling, automated assembly, or countless other industries are extensively using PLCs. Those who are not using this technology are wasting money, time, quality, and competitiveness. Almost all applica- tions that use electric, mechanical, or hydraulic devices control have a need for a PLC. For example, let’s assume that when a switch turns on we want to turn a solenoid on for 15 seconds and then turn it off regardless of the duration of the switch on posi- tion. We can accomplish this task with a simple external timer. What if our process included 100 switches and solenoids? We would need 100 external timers to handle the new requirements. What if the process also needed to count how many times the switches turned ON individually? We have to employ a large number of external coun- ters along with external timers. All this would require extensive wiring, energy, space, and expensive maintenance requirements. As you can see, the bigger the process, the more the need for a PLC. We can simply program the PLC to count its inputs and turn the solenoids ON for the specified time. 1.3.2  History of PLCs Prior to the introduction of PLCs, all production and process control tasks were imple- mented using relay-based systems. Industrialists were dealing with this inflexible and expensive control systems issues for decades. Upgrading a relay-based machine control production system means that the whole production system changes, which is very expensive and time consuming. In 1960s, General Motors (GM) issued a proposal for the replacement of relay-based machines. The PLC history was all started with an industrialist named Richard E. Morley, who was also one of the founders of Modicon Corporation, in response to GM’s proposal. Morley finally created the first PLC in 1969. It was sold in 1977 to Gould Electronics and was presented to GM. This first PLC is now kept safely at the company headquarters. plcdev.com lists the timeline shown in Figure 1.20 of the development of the PLC by different manufacturers. It spans the period from 1968 to 2005. The new SLC500 was introduced by Rockwell Automation/Allen-Bradley in 1994. It was designed to provide an easy-to-use and scalable infrastructure for small and large distributed con- trol applications. Details of the SLC500 and associated interfaces—including hard- ware, software, human machine interface (HMI)’s, communication, and networking, along with Industrial Control application implementation using this Allen Bradley infrastructure—will be the focus of this book. Reduction in size, lower cost, larger capabilities, standard interfaces, open communication protocols, user-friendly devel- opment environment, and human machine interface tools are the trend in the evolve- ment of PLC, as shown in the history chart. 01_Kamel_CH01_p001-040.indd 17 15/07/16 8:09 PM
  • 31. 18 Richard morley, Bedfird associates starts modicon 084 model General Motors, hydra-matic division specifies design for a “standard machine controller” GM Modicon 1971197019691968 AllenBradly Allen Bradley acquires Information Instruments Purchase of Bunker Ramo’s numerical controls division First attempt at the PDQ II Second attempt at the PMC Richard Morley, Bedford Associates starts Modicon 084 model Figure 1.20  1968 to 1971 early PLC systems** . First computer terminal for programming General Electric’s first programmable controller, PC-45 First design of a general purpose programmable controller—Logitrol PLC patent bulletin 1774 1978197719761975197419731972 Omron Generalelectric Others Omron’s first PLC sysmac-MIR Becomes operating division of Gould Model 184 Models 284/384 PLC-2 (1771 I/O) based on intel 8080 Standard line of Sysmac PLCs using microcomputers Figure 1.20  1972 to 1978 first-generation PLC systems** . (Continued) 01_Kamel_CH01_p001-040.indd 18 15/07/16 8:09 PM
  • 32. Introduction to PLC Control Systems and Automation 19 1982198119801979 Modbus network communications Data highway network PLC-3–based on AMD microprocessor Series 6 PLC Figure 1.20  1979 to 1982 early second-generation PLCs** . (Continued) Rockwell international buys Allen Bradley for $1.651 billion Model 984 Series 1 PLC Series 3 PLC Mitsubishi A series PLC debuts Siemens Simatic S5 PLC General Electric and Fanuc partner to form GE Fanuc automation Sales hit $1 billion. IBM compatible programming terminal PLC-5 based on Motorola 68000 1986198519841983 Figure 1.20  1983 to 1986 second-generation PLCs** . (Continued) 01_Kamel_CH01_p001-040.indd 19 15/07/16 8:09 PM
  • 33. 20 Chapter One Series 5 PLC Model 90-30 Model 90-70SLC500 small processors Profibus and ethernet capabilities Quantum range of automation control Schneider Electric purchases Modicon Low-cost networked block I/O Ethernet and TCP/IP capabilities DeviceNet open network Shipment of one millionth PLC AB merges with ICOM to form Rockwell Software COM1 PLC Direct founded as a subsidiary of Koyo Electronics C200H MicroLogix 1000 and flex I/O 19971996199519941993199219911990198919881987 Figure 1.20  1987 to 1997 early third-generation PLCs** . (Continued) 01_Kamel_CH01_p001-040.indd 20 15/07/16 8:09 PM
  • 34. Introduction to PLC Control Systems and Automation 21 PLC’s history is displayed in time categories starting from the early systems intro- duced from 1968 to 1971. This is followed by a span of six years, labeled as the first PLC generation. The second generation started in 1979 and covered a period of seven years, ending in 1986. This period showed greater number of vendors, mostly from existing U.S. companies in addition to German and Japanese firms. The early third-generation started 1987 and lasted for ten years, followed by a lasting period of continued growth and advancement in both hardware and software tools, which led to a wide deploy- ment of PLCs in most manufacturing automation and process control activities. 1.3.3  PLC Architecture A typical PLC mainly consists of a CPU (central processing unit), power supply, mem- ory, communication module, and appropriate circuits to handle I/O data. A PLC can be viewed as an intelligent box having hundreds or thousands of separate relays, counters, Figure 1.20  1998 to 2005 third-generation PLCs** . (Continued) ** PLC history chart (R. Morley, the father of PLC) 20052002200120001999199820042003 ControlLogix VersaMax Series RX7i PLC PAC system Series RX3i PLC PAC system CS1 PLC Direct changes its name to Automation Direct Mitsubishi Q series PLC debuts 01_Kamel_CH01_p001-040.indd 21 15/07/16 8:09 PM
  • 35. 22 Chapter One timers, and data storage locations. These counters, timers, and relays do not physically exist but they are software-simulated internal entities. The internal relays are simulated through bit locations in memory registers. Figure 1.21 shows a simplified block dia- gram of a typical generic PLC hardware architecture. PLC input modules are typically implemented using transistors and exist physi- cally. They receive signals from external switches and sensors through contacts. These modules allow the PLC to interface to and get a real-time sense of the process status. Output modules are typically implemented using transistors and use TRIACs to switch the connected power to the output coil when the output reference bit is true. They send ON/OFF signals to external solenoids, lights, motors, and other devices. These mod- ules allow the PLC to interface to and regulate, in real time, the controlled process. Counters are software simulated and do not exist physically. They can be pro- grammed to count up, down, or both up and down events/pulses. These simulated counters are limited in their counting speed but suitable for most real-time applications. Most PLC vendors provide high-speed counters modules that are hardware based and can accommodate extremely fast events. Typical counters include UP-COUNTER, DOWN-COUNTER, and UP/DOWN-COUNTERS. Timers are also software simulated and do not exist physically. The most common types are the ON-DELAY, OFF-DELAY, and RETENTIVE timers. Timing increments vary but are typically larger than one thou- sands of a second. The vast majority of process control applications make extensive use of timers and counters in a variety of ways and applications, which will be detailed in Chapter 3. Data storage is a high-speed memory/registers assigned to simply store data. They are usually used in math or data manipulation as temporary storage. They also used to store values associated with timers, counters, I/O signals, and user interface parame- ters. Communication buffers and related networking and user interface tasks also make use of high-speed storage. Typically, they can also be used to store data and programs when power is removed from the PLC. Upon power-up the same contents, which existed before power was removed, will still be available. 1.3.4  Hardwired System Replacement As stated in the previous section, PLCs were introduced to replace hardwired relays. In this section we will introduce the process of replacing the relay logic control by a PLC. The example we will use to demonstrate this replacement process may not be very cost Input circuit CPU Memory Output circuit Input relays Counters Ouput relays Internal utility relays Timers Data storage Power supply Figure 1.21  PLC architecture. 01_Kamel_CH01_p001-040.indd 22 15/07/16 8:09 PM
  • 36. Introduction to PLC Control Systems and Automation 23 effective for the use of a PLC but it will demonstrate the fundamental concepts. As shown earlier, the first step is to create the process ladder logic diagram/flow chart. PLCs do not understand these schematic diagrams but most vendors provide software to convert ladder logic diagrams into machine code, which shields users from actually having to learn the PLC processor’s specific code. Still, we have to translate all process logic into the standard symbols that the PLC recognizes. Terms like switch, solenoid, relay, bell, motor, and other physical devices are not recognized by PLCs. Instead input, output, coil, contact, timer, counter, and other terms are utilized. Ladder logic diagrams use standard symbols and associated addresses to uniquely represent different elements and events. Two vertical bars, representing L1 and L2 , span the entire diagram and are called the power/voltage bus bars. All networks/rungs start at the far left, L1 , and proceed to the right ending at L2 . Power flows from left to right through available closed circuits. Inputs like switches are assigned the contact symbol of a relay, as shown in Figure 1.22. Output like the bell is assigned the coil symbol of a relay as shown in Figure 1.22. The ac/dc supply is an external power source and is thus not shown in the ladder logic diagram. The PLC executes the logic and turns an output ON or OFF using TRIAC switching interface without any regard to the physical device connected to that output. The PLC must know the location of each input, output, or other elements used in our application. For example, where are the switch and the bell going to be physically connected to the PLC? The PLC has pre-specified I/O addresses in a wide variety of signal forms and sizes to interface with all types of devices. For now assume that our input (a push button switch) will be labeled 0000 and the output (a bell) will be called 0500. The final step converts the schematic into a logical sequence of events telling the PLC what to do when certain real-time events or conditions are satisfied. In our exam- ple we obviously want the bell to sound while the push button switch is being pressed. Electric power connection to the bell is made while the push button switch is being pressed. Once the push button is released, electric power connection to the bell is removed. The only requirement for this small system to work is to have the push button connect to the PLC input module and for the bell to be wired to the PLC output module, as will be shown later. Figure 1.23 shows the logic diagram for our simple example. More real, comprehensive industrial control examples and extensive coverage will illustrate this concept in Chapter 2. Two vertical bars, representing L1 (the hot phase) and L2 (the neutral phase), span the entire diagram and are called the power/voltage bus bars. All rungs start at the far left, L1 , and proceed to the right ending at L2 . Power flows from left to right through available closed circuits. Figure 1.24 and Figure 1.25 show the results of converting a hardwired control relay to a PLC ladder logic control. The first example implements a simple motor control using momentary START and STOP push buttons used to initiate A contact symbol A coil symbol Figure 1.22  Contact and coil symbols. 01_Kamel_CH01_p001-040.indd 23 15/07/16 8:09 PM
  • 37. 24 Chapter One 0500 End 0000 Figure 1.23  Bell logic diagram. L1 L2 Start M M Stop (a) Stop Start M M ( ) (b) Start StartStop ( ) L2 L1 L1 Input module Output module M M M L2 Stop (c) Figure 1.24  (a) Hardwired motor start/stop control relay; (b) motor start/stop PLC ladder logic control; (c) motor start/stop PLC ladder logic in relation to I/O modules. 01_Kamel_CH01_p001-040.indd 24 15/07/16 8:09 PM
  • 38. Introduction to PLC Control Systems and Automation 25 or stop the motor—only in the Auto mode. The Start PB is a normally open contact, which closes while the switch is pressed and opens when released. The Stop PB is a normally closed contact, which opens while the switch is pressed and closes once released. The second example shows a simple solenoid valve control using Start and Stop momentary push buttons. The solenoid valve is activated once the Start PB is pressed and deactivated through the Stop switch action. 1.3.5  PLC Ladder Logic The PLCs use a ladder logic program, which is similar to the line diagram used in hardwired relay control system. Figure 1.26 describes the control circuit for a ladder logic program rung, which is composed of three basic sections: the signal, the decision, Stop L2L1 Start CR1 CR1-1 CR1-2 SV1 (a) Stop Start SV1 SV1 ( ) (b) StartStop ( ) SV1 SV1 SV1 Start L2 L1 L2 Output module Input module L1 Stop (c) Figure 1.25  (a) Hardwired solenoid valve relay control; (b) solenoid valve PLC ladder logic control; (c) solenoid valve PLC ladder logic control in relation to I/O modules. 01_Kamel_CH01_p001-040.indd 25 15/07/16 8:09 PM
  • 39. 26 Chapter One and the action. The PLC input modules scan the input signals; the CPU executes the ladder logic program in relation to the input status and makes a decision. The output modules update and drive all output devices. The following sections show the I/O terminal connection and describe the digital I/O addressing format. As shown in Figure 1.27a, the input devices are connected to the input module through the hot L1, while neutral is connected directly to the input module. Figure 1.27b shows the outputs wired to the output terminal module, the outputs are wired to the output terminal module, and the neutral L2 connected to the output devices. The figure shows two digital inputs, a foot and pressure switches and two outputs, a solenoid and a pilot light. 1.4  Manual/Auto Motor Control Operation Figure 1.28 shows a manual/auto (M/A) control of a three-phase induction motor. While the M/A switch held in the Manual position, pressing the Start push button ener- gizes the magnetic motor starter, M. This Start PB is only for manual operation. Since the Start push button is a normally open momentary switch, the power to the magnetic starter is maintained through the latch with the auxiliary contact M1-1 around the Start push button. When the M/A switch is placed in Auto position, the digital output mod- ule receives the hot L1 through the Auto switch. When rung logic in the software for the Decision ActionSignal Figure 1.26  Ladder rung/network. Input module Output module (a) Discrete input connection (b) Discrete output connection L2 L1 L2 L1 Figure 1.27  Input/output terminal connection. 01_Kamel_CH01_p001-040.indd 26 15/07/16 8:09 PM
  • 40. Introduction to PLC Control Systems and Automation 27 output is true, switching of L1 occurs by the TRIAC switch inside the output module and the magnetic starter is energized causing the motor to run. Notice that the manual Start and Stop PBs have no effect on the automatic operation of the motor, they neither can stop the motor nor jog it. Motor status can be monitored with normally open con- tact M1-2 wired between the hot L1 and the digital input module in either of the two modes of operation. The neutral is directly connected to the input module. The motor overload conditions, which are typically deployed in the motor for protection and safety operation, are combined and shown in the PLC wiring connection in Figure 1.28. This safety and protection is part of the standard safety requirement for most industrial motors, as defined in the Electrical National Code. Overloads can be caused by exces- sive heat, current, or load among other factors. 1.5  SLC-500 LogixPro Simulator Setup LogixPro 500 is an interactive Allen Bradley SLC 500 PLC educational tool based on the ProSim-II simulation software. ProSim was developed to assist students in the acquisi- tion of programming skills used in the control of process-oriented equipment and sys- tems. Although designed primarily for use with PLCs, the flexible interface of the ProSim package readily allows it to be used with any computer programming language that supports ActiveX objects in a MS Windows environment. 1.5.1  The LogixPro 500 Screen Typical industrial processes, such as material transfer operations using a conveyor or batch mixing tanks complete with pumps and metering, are graphically displayed on the screen. The displayed processes are fully animated and when used with a PLC or M1 Start M1-1 M1-2 AM L1 L2Stop OL’s Output module Input module Figure 1.28  Manual/auto motor control PLC connection. 01_Kamel_CH01_p001-040.indd 27 15/07/16 8:09 PM
  • 41. 28 Chapter One PLC emulator, will respond to the signals of the PLC in the same manner as actual pro- cess equipment and sensors would respond. For example, a properly addressed PLC output can be used to start a pump on a mixing tank. Once started, visual indication of the pump’s rotation and fluid flow will appear on the computer screen. In addition, a digital signal representative of fluid flow would be transferred back as an input to the PLC program. Figure 1.29 shows the LogixPro 500 main screen. 1.5.2  Editing Your Program If you are familiar with Windows and know how to use a mouse, then you are going to find LogixPro 500 editing a breeze. Both instructions and rungs are selected simply by clicking on them with the left mouse button. Deleting is then just a matter of hitting the Del key on your keyboard. Double clicking (two quick clicks) with the left mouse but- ton allows you to edit an instruction’s address, while right clicking (right mouse but- ton) displays a pop-up menu of related editing commands. Online help is also available for quick reference. 1.5.3  Debugging Your Program If you take a look at the PLC panel, you’ll notice an adjustable Speed Control. This is not a component or a feature in normal PLCs, but is provided with LogixPro 500 so that you may adjust the speed of the simulations to suit your particular computer. The simulator’s adjustable speed panel does not show till you load and run the program. When the simulation is slowed, so is the PLC scanning. You can use this effectively when trying to debug your program. Set the scan slow enough and you can easily monitor how your program’s instructions are responding. This capability may not be typical of real PLCs but for training purposes, you will find that it is an invaluable debugging tool. Figure 1.29  LogixPro 500 main screen. 01_Kamel_CH01_p001-040.indd 28 15/07/16 8:09 PM
  • 42. Introduction to PLC Control Systems and Automation 29 1.5.4  RSLogix Documentation Be sure to check out the entries listed under “RSLogix/LogixPro 500 Reference Documents Links” on the lower half of the LogixPro 500 Index page. Also, if you have the space on your hard drive, then seriously consider installing the “AB SLC 500® Instruction Set Reference Manual.” 1.5.5  I/O Simulator Screen The I/O simulator screen shown in Figure 1.30 provides two discrete 16-bit inputs at address I:1 and I:3, one 16-bit four-digit BCD input at address I:5 , two discrete 16-bit outputs/coils at address O:2 and O:4, and one 16-bit four-digit BCD output display at address O:6. Only discrete I/Os are accommodated under LogixPro 500 simulation. Analog programming, debugging, and simulation will be discussed later using a sim- ple hardware trainer and the AB SLC 500 software. The same trainer will be used to perform HMI and PLC communication/networking tasks. Note: You can configure inputs, by right-clicking on the switch, as push buttons being normally close/normally open or Single Pole Single Through (SPST) being OPEN/CLOSE. The output light color can be configured by right-clicking (red, green, and yellow). The LogixPro simulator does not support real analog I/O programming. It also does not support floating point Figure 1.30  Discrete I/O simulation screen. 01_Kamel_CH01_p001-040.indd 29 15/07/16 8:10 PM
  • 43. 30 Chapter One arithmetic, which is not supported by the phased out unsupported SLC5/01 and SLC5/02 processors. Every I/O is assigned a unique address according to its terminal position within the I/O modules, which are assumed to be 16 points per module for the two discrete inputs and the two discrete outputs modules. These addresses are fixed and cannot be changed. Its configuration can be changed off line, while its status can be altered during program execution in the online mode. The four-digit BCD simulator allows manipulation of the input in BCD format. The display is also in BCD format. This often requires internal PLC conversion of inputs from BCD to decimal binary and outputs from decimal binary to BCD. Additional I/Os can be used in the program up to the limit defined for the target processor used, but those I/O elements will not be accessible from the I/O simulation panel. All I/O elements, along with other data used in your program, are accessible from the project tree. Closing the I/O simulator will show the project tree and allow examina- tion and manipulation of different program and data files as will be described next. 1.5.6  LogixPro 500 PLC Software The LogixPro 500 software’s main screen has three parts: the project tree, the PLC instructions panel, and the PLC control panel, as shown in Figure 1.31. You need to close an open simulator in order to be able to access the project tree. Figure 1.31  LogixPro 500 simulator main screen. 01_Kamel_CH01_p001-040.indd 30 15/07/16 8:10 PM
  • 44. Introduction to PLC Control Systems and Automation 31 The project tree functions look and behave like Windows Explorer, with the follow- ing main features: • As with other Windows programs, a folder with plus (+) sign can be expanded to show its contents. • A folder with minus (−) sign can be collapsed to hide its contents. • Using the window toolbar, you can perform the following: • Open files • Delete files • Copy files • Rename files • Create new file The size of the data files for the LogixPro 500 is less than the real RSLogix500 soft- ware, which will be detailed in Chapter 2. The LogixPro 500 instruction panel also gives limited coverage than the RSLogix 500; for example, advance instructions are not included. 1.6 Process Control Choices PLCs are not the only devices available for controlling a process or automating a sys- tem. Control relays and PCs can be used to implement the same control. Each choice may be of a benefit depending upon the control application. This debate has been going on for a long time while the mix of technologies advanced at an incredible rate. With continuing trend of PLC prices going down, size shrinking, and performance improv- ing, the choice in favor of PLCs has become less of a debate. Still, system owners and designers have to ask themselves if using a PLC is really an overkill for an intended process control or automation application. Table 1.1 summarizes a brief comparison between PLCs and control relays with important issues to be considered. A dedicated controller is a single instrument that is dedicated to controlling one process variable such as temperature for a heating control. They typically use PID (proportional integral derivative) control and have the advantage of an all-in- one package, typically with displays and buttons. These controllers can be an excellent tool to use in simple applications. PLCs can compete functionally and financially with these controllers, especially when several controllers are needed. PLCs offer a greater degree of flexibility and can be programmed to handle existing and future scenarios. PCs can also be fitted with special hardware and software for use in process control applications. PCs can provide advantage in certain control tasks relative to PLCs, but their use is not as widespread as PLCs. A hybrid networked system of PLCs and PCs is in wide use in large, distributed control applications. Table 1.2 shows a brief comparison between PLCs and PCs with important issues to be considered. 01_Kamel_CH01_p001-040.indd 31 15/07/16 8:10 PM
  • 45. 32 Chapter One Chapter 1: Home Work Problems and Laboratory Projects 1) Define the following: a. Set point variable. b. Controlled variable. c. Manipulated variable. d. Direct acting control. e. Reverse acting control. 2) What is the meaning of the word “process” in a chemical industry? 3) Define What is an open-loop controller? 4) What is the difference between the following: a. Open- and closed-loop control b. Manual and automated control c. Direct acting and reverse acting control 5) List at least three advantages of PLC control over hardwired relay control. Issue of PLC and Control Relays Comparison PLCs Control Relays Control Logic Changes Changes in logic can easily be implemented in software. Changes require more complex hardware modifications. Deployment on Different Systems Easier to customize and download software. Requires construction of new control panels. Future Expansion New I/O modules, expansion chassis, HMI’s, and software patches can be added. Networked control systems can be utilized. Expansion is possible but at higher cost. Reliability PLCs are more robust and redundancy is available. Less reliable because of the use of individual components. Down time Troubleshooting/changes can be made online with no downtime. Changes or troubleshooting often requires the system to go offline. Space Requirement Space requirement rapidly decreases as the number of relays increase. Huge space requirement for a system with large number of relays. Data Acquisition and Communication PLCs support data collection, analysis, and communication. Not directly or easily possible. Maintenance and Speed of Control Less maintenance and faster speed of control. Mechanical parts require more maintenance and reduce speed of control. Cost Effective cost and performance for a wide range of process control applications. Can be cost effective for very small systems. Table 1.1  PLC and control relay comparison. 01_Kamel_CH01_p001-040.indd 32 15/07/16 8:10 PM
  • 46. Introduction to PLC Control Systems and Automation 33 6) Explain the advantages of using a logic diagram or flow chart in programming. 7) Explain the steps used in implementing a single-variable, closed-loop control. 8) Define the following: a. Absolute error b. Error as a percent of set point c. Error as a percent of range 9) If an oven set point = 220°C, Measured value = 200°C, and Range = 200–250°C, answer the following: a. What is the absolute error? b. What is the error as a percent of set point? c. What is the error as a percent of range? d. Repeat the above parts for a measured temperature value of 230°C assuming the same set point and range. Comparison Issues PLCs PCs Environment PLCs are specifically designed for harsh conditions with electrical noise, magnetic fields, vibration, extreme temperatures, or humidity. Common PCs are not designed for harsh environments. Industrial PCs are available but at much higher cost. Ease of Use By design, PLCs are friendlier to technicians since they are programmed in ladder logic and have easy connections. Operating systems like Windows, UNIX, and Linux are common. Connecting I/Os to the PC is not always as easy. Flexibility PLCs in rack format are easy to exchange and expand. They are designed for modularity and expansion. Typical PCs are limited by the number of special cards they can accommodate and are not easily expandable. Speed PLCs execute a single program in sequential order and have better ability to handle real-time events. PCs are designed to handle multiple tasks. Real-time operating systems can handle real-time events. Reliability A PLC rarely crashes over long periods of time. Chances of a PC locking up and crashing are more. Programming Languages PLCs languages used are typically ladder logic, function block, or structured text. PCs are very flexible and powerful in providing a wide variety of programming tools. Data Management Memory is limited in its ability to store and analyze large data. PCs excel in long-term data storage, modeling, simulation, and trending. Cost Hard to compare pricing due to many variables, like I/O counts, hardware needed, programming software, etc. Table 1.2  PLC and PC control system comparison. 01_Kamel_CH01_p001-040.indd 33 15/07/16 8:10 PM
  • 47. 34 Chapter One 10) Explain why the Electrical National Code demands users to control a motor’s start/ stop using normally open/normally close momentary push button switches instead of maintain switches. 11) Explain the following: a. The function of a process controller. b. The function of the final control element. c. The main objectives of process control. 12) Study the circuit in Figure 1.32 and answer the following questions: a. What logic gate type does the indicator represents? b. What is the status (ON/OFF) of the indicator if push buttons A and B are pressed and released one time? c. What is the status of the indicator if push buttons A and B are pressed and maintained closed all the time? d. What is the status of the indicator if push button A or B is pressed at any one time? e. Show how you can modify the circuit to maintain the indicator status ON if push button A or B is pressed and maintained closed. f. Modify the circuit in Figure 1.32 to maintain the indicator ON once the two push buttons are activated. g. Add a STOP push button to turn the indicator OFF and restart the process at any time. 13) Figure 1.33 shows a line diagram for an auto/manual motor control circuit. The start/stop push buttons should start and stop the motor only if the Auto/Manual switch is in Manual position. As shown in Figure 1.33, the circuit has error(s). Perform the following: a. Define the error(s). b. Redraw the circuit to correct the error. 14) Find and explain the status of CR1, M1, and SV1 in Figure 1.34 under the following conditions: a. PB1 is not pushed, and LS1 is open. b. PB1 is pushed, and LS1 is open. c. PB1 is pushed, and LS1 is close. A L1 L2 CR1 CR2 CR2 IndicatorCR1 B Figure 1.32  AND logic gate indicator. 01_Kamel_CH01_p001-040.indd 34 15/07/16 8:10 PM
  • 48. Introduction to PLC Control Systems and Automation 35 15) In some applications, such as motion control, machine tooling, and material handling, the operator should be able to turn the motor on forward/reverse a few seconds to move the load slightly in the forward or reverse direction. This type of motor control is called jogging. Modify Figure 1.14 to include a run/jog switch. 16) Using internet resources, write a two pages report summarizing the history and evolution of PLC’s. 17) Figure 1.17 shows a latch/unlatch logic line diagram controlling a motor. Redraw the line diagram to include interlock contacts in order to prevent the operator from pushing the two push buttons (Start/Stop) simultaneously. 18) Process control logic can be implemented using relays, PLCs, or PCs. Construct a comparison between the three options based on cost, scalability, and historical developments / deployments. Use the internet to construct your research. PB1 PB2 CR1 CR1-2 LS1 CR1-1 CR1-3 M1 Rung 2 Rung 1 Rung 3 SV1 L1 L2 Figure 1.34  Problem 14 wired control relay for motor and solenoid valve activation. Stop Start OLs M1 M M1-1 M1-2 A L2L1 Digital output module Digital input module Figure 1.33  Problem 13 incorrect auto/manual control. 01_Kamel_CH01_p001-040.indd 35 15/07/16 8:10 PM
  • 49. 36 Chapter One 19) Figure 1.35 shows a three-phase reversible (runs forward or reverse direction) induction motor wiring and the associated relay logic diagram. Identify and correct the wrong motor wiring and explain the reason for the rewiring. Laboratory 1.1—LogixPro 500 Program Creation The objective of this laboratory is to get users familiar with the LogixPro500 simulator software. Use the following steps to create a ladder logic program in LogixPro 500: • From the Simulation menu bar close the existing simulation and open the I/O simulator. • Open a new file and from select processor enter the processor type, as shown in Figure 1.36. Figure 1.36  I/O simulation panel in LogixPro 500. L1 L1 L2 L3 OLs Electric motor Control relays OLs L2 F R F-2 R-2 Forward Stop R-4 R-3 R-2 F-4 F-3 F-1 R-1 Reverse F-2 T1 T2 T3 Mtr Figure 1.35  Wiring and relay logic for problem 19. 01_Kamel_CH01_p001-040.indd 36 15/07/16 8:10 PM
  • 50. Introduction to PLC Control Systems and Automation 37 • Collapse the I/O simulation screen back to its normal size by clicking on the same (center) button you used to maximize the simulation’s window. You should now be able to see both the simulation and program windows again. If you wish, you can adjust the relative size of these windows by dragging the bar that divides them with your mouse. • Enter the single rung program shown in Figure 1.37, which consists of two input instructions (XIC [Examine If Closed]), Examine If Open, and a single output instruction (OTE [Output Energize]). • Click on the XIC instruction with your left mouse button (left click), then drag and drop to the input section of rung 0 and enter the address (I:1/0) or drag and drop the address from the I/O simulator. Repeat for XIO address (I: 1/1) from the I/O simulator as shown in Figure 1.38. • Click on the OTE instruction with your left mouse button (left click), then drag and drop to the output section rung 0 and enter the address (O:2/0) or drag and drop the address as shown in the Figure 1.38. • You can drag and drop addresses between ladder rungs. • Right click on the XIC instruction and select “Edit Symbol” from the drop-down menu that appears. Another textbox will appear where you can type in a name (SS1), (SS2) to associate with these addresses, as shown in Figure 1.39. As before, a click anywhere else will close the box. Figure 1.37  One rung program in LogixPro 500. Figure 1.38  Program creation in LogixPro 500. 01_Kamel_CH01_p001-040.indd 37 15/07/16 8:10 PM
  • 51. 38 Chapter One • Enter the address and symbol for the OTE instruction and your first RSLogix program will now be complete. Before continuing however, double check that the addresses of your instructions are correct. Laboratory 1.2—Program Testing It is now time to “Download” your program to the PLC. First click on the “Toggle” button at the top right corner of the Edit panel, which will bring the PLC panel into view, as shown in Figure 1.40. Click on the “Download” button to initiate the downloading of your program to the PLC. Once download is complete, click inside the “RUN” option selection circle to start PLC scanning. The simulator screen shown in Figure 1.41 should now be in view. For this laboratory we will be using the I/O simulator. Use your mouse to click on I: 1/0 switch and note the change in the status color (yellow) of the terminal to which the switch is connected to and the ladder rung inputs: Switch1, Switch2, and output M1. Figure 1.39  Editing tag symbols in LogixPro 500. Figure 1.40  PLC panel. 01_Kamel_CH01_p001-040.indd 38 15/07/16 8:10 PM
  • 52. Introduction to PLC Control Systems and Automation 39 Figure 1.41  LogixPro 500 simulator screen. Laboratory 1.3—Converting Hardwired Control Relay to PLC Ladder Logic Refer to Figure 1.34 and use the following I/O addresses to convert the hardwired con- trol relay to a PLC ladder program: Input Tag Name Output Tag Name PB1 SS3 CR1 PL2 PB2 SS4 M1 PL3 LS1 SS5 SV1 PL4 Requirements: • Assign the three required physical discrete input addresses from the Simulator panel. • Assign the three required physical discrete output addresses from the Simulator panel. 01_Kamel_CH01_p001-040.indd 39 15/07/16 8:10 PM
  • 53. 40 Chapter One • Change the selector switches to the desired type and status. • Change the discrete output indicators to three different colors. • Program the ladder logics required. • Download the program and perform the check out. • Submit your reports with your comments on the laboratory. 01_Kamel_CH01_p001-040.indd 40 15/07/16 8:10 PM