®
Because learning changes everything.
Programmable
Logic
Controllers
Frank D.
Petruzella
Sixth Edition
© McGraw Hill LLC. All rights reserved. No reproduction or distribution without the prior written consent of McGraw Hill LLC.
Chapter 1
Programmable Logic
Controllers [PLCs]
An Overview
Access the text alternative for slide images.
© McGraw Hill LLC Image Courtesy of Rockwell Automation, Inc. 2
What’s a PLC?
Programmable Logic Widely used industrial A computer that is designed
Controller process control technology to work in industrial
environments
The Evolution of
Automation
Early 1900s: relays for control
1968: 1st PLC Morley’s Modicon 084
to replace relay logic
General Motors: pioneers
Functions added for timing, counting,
calculating, comparing, processing
Next Gen: sharing data, motion control,
improvements in size, speed, memory,
programming options
Safety PLCS
PACS
PC, PLC & PAC
PAC –
PLC –
PC – Personal Programmable
Programmable
Computer Automation
Logic Controller
Controller
PLCs are faster, smaller, cheaper and more powerful than before.
Technology has Webservers
PC vs PLC
allowed PLC to do Email
many PC
functions: FTP servers
International Relational Database
no longer PCs are becoming more deterministic
exclusive Scan Time
tasks
Synchronous and Asynchronous I/O Interface
PLC vs PAC
PACs are small local control systems: PC + PLC + multitask functions
• Control 1 or more pieces of equipment
• Can be programmed with ladder logic or advanced languages (C++)
What makes a PAC unique?
• Multitasking, greater memory
• Multiple processors
• Increased programming languages and methods
• Motion control
• PC networking
• Tag-based addressing
Evolution of PLC (AB)
Widely used industrial control technology
Most widely used industrial
process control technology.
• Designed for machine process control.
• A computer built to operate in industrial
environments.
• Equipped with input/output interfaces and a
control programming language.
© McGraw Hill LLC 9
Replace Relay Logic
Initially used to replace relay
logic its ever-increasing
range of functions includes
timing, counting, calculating,
comparing, and the
processing of analog signals.
Access the text alternative for slide images.
© McGraw Hill LLC 10
Features
Cheaper Reliability Flexibility
Easier to
Communications Faster Response
Troubleshoot
PLC vs Relay
PLC
control
panel
Relay
control
panel
Eliminates much of the hardwiring associated
with conventional relay control circuits.
© McGraw Hill LLC Source: (Left Image) Courtesy Mid-Illini Technical Group, Inc.; (Right Image) Photo courtesy of Ramco Electric Ltd., Toronto 12
Increased Reliability
Increased Reliability - Since all the logic is contained
in the PLC’s memory, there is no chance of making
a logic wiring error.
Access the text alternative for slide images.
© McGraw Hill LLC 13
More Flexibility
More Flexibility - It is
easier to create and
change a program in a
PLC than to wire and
rewire a circuit.
Access the text alternative for slide images.
© McGraw Hill LLC 14
Lower Cost
Lower Cost - Generally,
if an application has
more than about a
half-dozen control
relays, it will probably
be less expensive to
install a PLC.
© McGraw Hill LLC Source: Courtesy Mid-Illini Technical Group, Inc. 15
Communications Capability
Communications Capability
Can communicate with
other PLCs or computers.
© McGraw Hill LLC 16
Faster Response Time
Faster Response Time - Machines that
process thousands of items per second
and objects that spend only a fraction
of a second in front of a sensor require
the PLC’s quick-response capability.
© McGraw Hill LLC Source: Courtesy of Banner Engineering Corp. 17
Easier to Troubleshoot
Easier to Troubleshoot - To find and fix problems,
users can display the control program on a
monitor and watch it in real time as it executes.
Process
Access the text alternative for slide images.
© McGraw Hill LLC 18
Easier to Test Field Devices
Easier to Test Field Devices – A PLC control
panel has the ability to check field devices at
a common point.
Access the text alternative for slide images.
© McGraw Hill LLC 19
Section 1.2
Parts of a PLC
© McGraw Hill LLC 20
PLC Block Diagram
Access the text alternative for slide images.
© McGraw Hill LLC 21
PLC Architecture
An open architecture design allows the system to
be connected easily to devices and programs made
by other manufacturers.
A system with a closed architecture is one whose
design is proprietary, making it more difficult to
connect to other systems.
© McGraw Hill LLC 22
Fixed I/O
Fixed I/O comes in one
package with no separate
removable units.
Access the text alternative for slide images.
© McGraw Hill LLC 23
Modular I/O
Modular I/O is divided
by compartments
into which separate
modules can be
plugged.
Access the text alternative for slide images.
© McGraw Hill LLC 24
Power Supply
The power supply provides DC power to all
modules that plug into the rack. For large
PLC systems, this power supply does not
normally supply power to the field devices.
© McGraw Hill LLC Source: Photo of PLC Modicon M340 © Schneider Electric, 2010. [Link]. 25
Processor (CPU)
The processor (CPU)
consists of a
microprocessor for
implementing the logic
and controlling the
communications among
the modules.
The processor requires memory for storing the results
of the logical operations performed by the
microprocessor as well as the operating system and the
PLC program.
Access the text alternative for slide images.
© McGraw Hill LLC 26
RS500 Scan Cycle
The PLC program is executed as part of a
repetitive process referred to as a scan.
Starts with the
CPU reading the
status of all inputs.
Access the text alternative for slide images.
© McGraw Hill LLC 27
Program Scan
When a Logix 5000 controller executes a
program, it must know when external devices
controlling a process are changing.
• During each operating cycle, the
processor reads all the inputs, takes these
values, and energizes or de-energizes the
outputs according to the user program.
• This process is known as the
program scan.
© McGraw Hill LLC 28
Input/Output
The I/O (Input/Output) system forms the
interface by which field devices are connected
to the controller.
Input devices
such as
pushbuttons,
limit switches,
and sensors
are hardwired
to the input
module
terminals.
Access the text alternative for slide images.
© McGraw Hill LLC 29
Logix controller operating cycle.
Access the text alternative for slide images.
© McGraw Hill LLC 30
Program is scanned • As the program is
one rung at a time. scanned, the status of
inputs are checked for
True (1 or ON) or False
(0 of OFF) conditions.
Access the text alternative for slide images.
© McGraw Hill LLC 31
The status
signals from the
inputs are sent to
the input tags
where they are
stored.
Access the text alternative for slide images.
© McGraw Hill LLC 32
Program scanning
• As the program is
scanned by the
processor, inputs are
checked for True or
False conditions and the
ladder logic is evaluated
based on these values.
• The resulting ON or OFF action, as a result
of evaluating each rung, is then sent to the
output tags for storage.
Access the text alternative for slide images.
© McGraw Hill LLC 33
During the output
update portion of the
scan, corresponding
output values are sent
to the process or
machine by way of the
output module.
Access the text alternative for slide images.
© McGraw Hill LLC 34
I/O updates occur asynchronously
to the scan of the logic.
• With a Logix 5000 processor two separate 32-bit
unsynchronized processes go on simultaneously - that is,
asynchronously.
• The module can update the input tag from the field
and write the output tag to the field at any point during
the processor’s execution of the ladder rungs.
• The result is more efficiency and control over when
the input and output field device data are updated.
© McGraw Hill LLC 35
Input/Output System
The I/O (Input/Output) system forms the
interface by which field devices are
connected to the controller.
Output devices
such as motor
starters, solenoid
valves, and
indicator lights are
hardwired to the
output module
terminals.
Access the text alternative for slide images.
© McGraw Hill LLC 36
Programming Device
A programming device is used to enter the desired
program into the memory of the processor.
© McGraw Hill LLC 37
Personal Computer
A personal computer (PC) is the most commonly
used programming device.
The computer
monitor is able
to display more
logic on the
screen thus
simplifying
interpretation of
the program.
Access the text alternative for slide images.
© McGraw Hill LLC Source: Image Courtesy of Rockwell Automation, Inc. 38
Program
A program is a series of instructions that directs
the PLC to execute actions.
Relay ladder logic, the standard programming
language, is based on electromagnetic relay control.
Access the text alternative for slide images.
© McGraw Hill LLC 39
Section 1.3
Principles of Operation
© McGraw Hill LLC 40
Mixer Process Control Problem
• A mixer motor is to be
used to automatically
stir the liquid in a vat
when the temperature
and pressure reach
preset values.
• Manual operation of
the motor is provided
by means of a separate
pushbutton station.
Access the text alternative for slide images.
© McGraw Hill LLC 41
Hardwired relay method
Hardwired relay method for control of motor
The motor starter coil (M) is energized when both the
pressure and temperature switches are closed or when
the manual pushbutton is pressed.
Access the text alternative for slide images.
© McGraw Hill LLC 42
PLC method for control of motor
The same input field devices Field devices are
(pressure switch, hardwired to an
temperature switch, and input module.
pushbutton) are used.
Access the text alternative for slide images.
© McGraw Hill LLC 43
PLC method continued
PLC method for control of motor
Starter coil is The same output field
hardwired to an device (motor starter
output module. coil) is used.
Access the text alternative for slide images.
© McGraw Hill LLC 44
Enter the ladder logic program
Enter the PLC ladder logic program into the
memory of the CPU.
• The symbols represent instructions, and the
letters/numbers represent the instruction’s tags.
• Each input and output device is given a base tag,
which lets the PLC know where it is connected and
an alias tag as an identifier.
© McGraw Hill LLC 45
Run the program
• For the program to operate, the controller is placed in the
RUN mode.
• During each scan the controller examines the status of input
devices, executes the user program, and changes outputs
accordingly.
• The coil O/1 is energized when contacts I/1 and I/2 are closed
or when contact I/3 is closed.
• Either of these conditions provides a continuous logic path
across the rung that includes the coil.
Access the text alternative for slide images.
© McGraw Hill LLC 46
Typical Wiring
Typical wiring required to implement the process
control scheme using a fixed PLC controller.
Access the text alternative for slide images.
© McGraw Hill LLC 47
Section 1.4
Modifying the Operation
© McGraw Hill LLC 48
Ease of change
One of the important features of a PLC is the
ease with which the program can be changed.
• Original hardwired process control circuit modified.
• Change requires that the manual pushbutton control be
permitted to operate at any pressure, but not unless the
specified temperature setting has been reached.
Access the text alternative for slide images.
© McGraw Hill LLC 49
No rewiring
• If a relay system were used, it would require some rewiring of
the circuit.
• If a PLC system were used, no rewiring would be necessary.
• The inputs and outputs are still the same.
• All that is required is to change the PLC ladder logic program.
Access the text alternative for slide images.
© McGraw Hill LLC 50
Section 1.5
PLCs versus Computers
© McGraw Hill LLC 51
PLC architecture compared to PC
The architecture of a PLC is basically the
same as that of a personal computer.
Unlike PCs, the
PLC is designed
to operate in the
industrial
environment.
© McGraw Hill LLC Courtesy of Siemens 52
Programmed in relay ladder logic
Unlike the personal computer, the PLC is
programmed in relay ladder logic or other
easily learned languages.
The PLC comes with its program language built into
its memory and has no permanently attached
keyboard, CD drive, or monitor.
Access the text alternative for slide images.
© McGraw Hill LLC 53
PLCs execute single program
Computers are capable of executing several
programs simultaneously and in any order.
PLCs execute a single
program in an
orderly and
sequential fashion
from first to last
instruction.
Access the text alternative for slide images.
© McGraw Hill LLC 54
Troubleshooting
Troubleshooting is
simplified by the use of
fault indicators and
messaging displays.
Input/output
modules are easily Module
connected and slides into
replaced. the rack
Access the text alternative for slide images.
© McGraw Hill LLC 55
PLC Programming Software
RSLogix RSLinx
Is used to program and document the process
Ladder logic most popular
programming language
Access the text alternative for slide images.
© McGraw Hill LLC 56
PLC HMI Software
Human Machine Interface
(HMI) - software allows the
user to monitor and control
the process.
• View a process - or a graphical representation of a
process on a monitor.
• Determine how the system is running, trend values,
and receive alarm conditions.
© McGraw Hill LLC Source: Image Courtesy of Rockwell Automation, Inc. 57
Programmable Automation Controllers
Programmable Automation Controllers (PACs)
Combine PLC ruggedness with PC functionality.
Build advanced systems incorporating software
capabilities such as.
• Advanced control.
• Communication.
• Data logging, and.
• Signal processing.
PAC software is typically event-driven.
© McGraw Hill LLC 58
Section 1.6
PLC Size and Application
© McGraw Hill LLC 59
Control management
A single ended application involves one PLC
controlling one process.
A multitask PLC application involves one PLC
controlling several processes.
A control management PLC application
involves one PLC controlling several others.
Access the text alternative for slide images.
© McGraw Hill LLC 60
Amount of memory
The amount of memory required depends on:
• Number of I/O points.
• Size of control program.
• Data-collecting requirements.
• Supervisory functions required.
• Future expansion.
Access the text alternative for slide images.
© McGraw Hill LLC 61
Instruction set
The instruction set for a particular PLC lists
the different types of instructions supported.
Table 1-1 Typical PLC Instructions
Instruction Operation
XIC (Examine ON) Examine a bit for an ON or 1 condition
XIO (Examine OFF) Examine a bit for an OFF or 0 condition
OTE (Output Energize) Turn ON a bit (nonretentive)
OTL (Output Latch) Latch a bit (retentive)
OTU (Output Unlatch) Unlatch a bit (retentive)
TOF (Timer Off-Delay) Turn an output ON or OFF after its rung has been OFF for a preset time interval
TON (Timer On-Delay) Turn an output ON or OFF after its rung has been ON for a preset time interval
CTD (Count Down) Use a software counter to count down from a specified value
CTU (Count Up) Use a software counter to count up to a specified value
© McGraw Hill LLC Access the text alternative for slide images.
62