You are on page 1of 17

Programmable Logic

Controllers

Introduction to PLCs

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-1

Outline
• Introduction
• Definition and History of the PLC
• Example PLCs
• Overall PLC System
• PLC Advantages and Disadvantages

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-2

1-1
Definition And History Of The PLC

• A PLC is a user-friendly, microprocessor-


based specialized computer that carries out
control functions of many types and levels of
complexity.
• Its purpose is to monitor crucial process
parameters and adjust process operations
accordingly.
• Used extensively because the PLC
– Is easy to set up and program Advantages
– Behaves predictably (Stable)
– Ruggedized Shock Immune

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-3

Definition And History Of The PLC

• It can be programmed (to a degree),


controlled, and operated by a person
unskilled in operating (programming)
computers. Easy to be programmed

• Essentially, a PLC's operator draws the lines


and devices of ladder diagrams with a Programming
Technique
keyboard/mouse onto a display screen.
• The resulting ladder diagram is converted
into computer machine language and run as
a program.

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-4

1-2
Example PLCs

Allen-Bradley PLC5 Allen-Bradley SLC500

Allen-Bradley Micrologix Allen-Bradley Picocontroller


Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-5

PLC basics
• Some PLCs are
– integrated into a single unit (Picocontroller),
– whereas others are modular (PLC5, SLC500)
– The Micrologix product lies somewhere between
the PLC5 and the Picocontroller
• Integrated PLCs are sometimes called
brick PLCs because of their small size
– These PLCs have embedded I/O (i.e. the I/O is a
part of the same unit as the controller itself)
– Modular PLCs have extended I/O

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-6

1-3
Components in a PLC system
• CPU module, containing the processor and
memory
• Input and output modules, to allow the PLC
to read sensors and control actuators
– A wide variety of types are available
• Power supply for the PLC, and often sensors
and low power actuators connected to I/O
modules
• A rack or bus so the PLC can exchange data
with I/O modules

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-7

PLC in a automated system


Programming unit Analog sensors Analog
(temperature, actuators
pressure sensors) (motors, etc.)
Network

CPU Digital Digital Analog Analog


Power
Module Input Output Input Output
Supply
(PLC) Module Module Module Module

Digital
Digital sensors
actuators
(limit switches,
(pneumatic valves,
proximity sensors)
Indicator lamps)
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-8

1-4
Additional PLC components
• A programming unit is necessary to create,
edit and download a user program to the PLC
• Additional components can include:
– Network interfaces: to allow PLCs to function in
a networked environment
– Communication adapters for remote I/O
devices: so I/O devices do not have to be
physically close to the CPU module
– Operator interface devices: allow monitoring
and/or data entry by operators

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-9

Definition And History Of The PLC


• The PLC takes the place of much of the external
wiring required for control of a process.
– http://www.as-uk.co.uk/projectupgrade.html
• The PLC will operate any system that has output
devices that go on and off (known as discrete, or
digital, outputs).
• It can also operate any system with variable
(analog) outputs.
• The PLC can be operated on the input side by on-off
devices (discrete, or digital) or by variable (analog)
input devices.

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-10

1-5
Definition And History Of The PLC

• The first PLC systems evolved from


conventional computers in the late 1960s and
early 1970s.
– These first PLCs were installed primarily in
automotive plants.
• Traditionally, the auto plants had to be shut
down for up to a month at model changeover
time.
• The early PLCs were used along with other
new automation techniques to shorten the
changeover time.
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-11

Definition And History Of The PLC

• One of the major time-consuming


changeover procedures had been the wiring
of new or revised relay and control panels.
• The PLC keyboard reprogramming procedure
replaced the rewiring of a panel full of wires,
relays, timers, and other components.
• The new PLCs helped reduce changeover
time to a matter of a few days.

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-12

1-6
PLC Advantages
• Flexibility
– In the past, each different electronically controlled
production machine required its own controller; 15
machines might require 15 different controllers.
– Now it is possible to use just one model of a PLC
to run any one of the 15 machines.
– Furthermore, you would probably need fewer than
15 controllers, because one PLC can easily run
many machines.
– Each of the 15 machines under PLC control would
have its own distinct program (or a portion of one
running program).

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-13

PLC Advantages
• Implementing Changes and Correcting
Errors
– With a wired relay-type panel, any program
alterations require time for rewiring of panels and
devices.
– When a PLC program circuit or sequence design
change is made, the PLC program can be changed
from a keyboard sequence in a matter of minutes.
– No rewiring is required for a PLC-controlled
system.
– Also, if a programming error has to be corrected
in a PLC control ladder diagram, a change can be
typed in quickly.

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-14

1-7
PLC Advantages
• Large Quantities of Contacts
– The PLC has a large number of contacts for each
coil available in its programming.
– Suppose that a panel-wired relay has four
contacts and all are in use when a design change
requiring three more contacts is made.
• Time would have to be taken to procure and install a new
relay or relay contact block.
– Using a PLC, however, only three more contacts
would be typed in.
• Contacts are now a “software” component

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-15

PLC Advantages
• Lower Cost
– Increased technology makes it possible to
condense more functions into smaller and less
expensive packages.
– Now you can purchase a PLC with numerous
relays, timers, and counters, a sequencer, and
other functions for a few hundred dollars.
• Pilot Running
– A PLC programmed circuit can be evaluated in the
lab. The program can be typed in, tested,
observed, and modified if needed, saving valuable
factory time.
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-16

1-8
PLC Advantages
• Visual Observation
– A PLC circuit's operation can be seen during
operation directly on a CRT screen.
– The operation or mis-operation of a circuit can be
observed as it happens.
– Logic paths light up on the screen as they are
energized.
– Troubleshooting can be done more quickly during
visual observation.

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-17

PLC Advantages
• Ladder or Boolean Programming Method
– The PLC programming can be accomplished in the
ladder mode by an engineer, electrician or
possibly a technician. Alternatively, a PLC
programmer who works in digital or Boolean
control systems can also easily perform PLC
programming.
• Reliability and Maintainability
– Solid-state devices are more reliable, in general,
than mechanical systems or relays and timers.
Consequently, the control system maintenance
costs are low and downtime is minimal.

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 1-18

1-9
Programmable Logic
Controllers

PLC Basics

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-1

Operating systems and application


programs
• A PLC contains a basic operating system that
allows for:
– Downloading and executing user (ladder logic)
programs
– Communicating with devices
• I/O modules
• Other PLCs on a network
– Holding configuration data such as
• Number and type of I/O modules present in the PLC
system
• Status information

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-2

2-1
Operating systems and application
programs
• A PLC retains its operating system, user
programs, and some data in retentive
(nonvolatile) memory
– While the PLC is off or is even disconnected from
the power supply (given a battery backup)
• A PLC can then resume running a user
program as soon as power is restored
– The PLC may be programmed to require some
operator action before resuming user program
execution (for safety purposes)

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-3

User program execution


• A PLC executes an initialization step when placed in
run mode, then repeatedly executes a scan cycle
sequence
• The basic PLC scan cycle consists of three steps
– An input scan
– A user program scan
– An output scan
• The total time for one complete program scan is a
Performance function of processor speed, I/O modules used, and
parameter
length of user program
• Typically, hundreds of complete scans can take place
in 1 second

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-4

2-2
Input scan
• During the input scan, data is taken from all input
modules in the system and placed into an area of
PLC memory referred to as the input image area

Input module
Input Image Area

PLC
Input module

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-5

User program scan


• During the program scan, data in the input image
area is applied to the user program, the user
program is executed and the output image area is
updated
PLC

Input Output
User
Image Image
Program
Area Area

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-6

2-3
Output scan
• During the output scan, data is taken from
the output image area and sent to all
output modules in the system

Output module
PLC

Output module
Output Image Area

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-7

PLC scanning considerations


• During the input scan, input terminals are
read and the input image area is updated
accordingly.
• During the program scan
– data in the input image area is applied to the user
program
– the program is executed (instructions carried out
in sequence)
– the output image area is updated appropriately
• During the output scan, data associated with
the output image area is transferred to
output terminals
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-8

2-4
PLC scanning considerations
• It is important to understand that the input,
program, and output scans are separate,
independent functions
– Any changes in the status of input devices during
the program or output scan are not recognized
until the next input scan
• Furthermore, data changes in the output
table are not transferred to the output
terminals during the input and program scans
• The transfer affecting the output devices
takes place only during the output scan
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-9

PLC scanning considerations


• With all PLCs, there are special processing
considerations to note
• First, all PLCs take a specific amount of time
to scan their operational programs
completely
• Typically, the program scanning takes place
left to right across each rung and from the
top to bottom rungs, in order
• Usually, the complete ladder scan time is a
few milliseconds

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-10

2-5
PLC scanning considerations
• Another scanning consideration involves
proper operational sequencing of events
• An output might not go on immediately in
sequence as it would in a relay logic system
• In a relay logic system, an event occurring
anywhere in the ladder control system results
in immediate action
• In a PLC ladder control diagram, however, no
effect takes place until the rung is scanned
• In most cases, the PLC logic delay effect is
inconsequential

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-11

PLC scanning considerations


• Program (ladder logic) scanning typically takes place
left to right across each rung and from the top to
bottom rungs, in order
– Known as rung scanning, it is the method used, for example,
by Allen-Bradley
• Another method, used by Modicon/Schneider
Automation is known as column scanning
– Here the processor "looks" at the first contact at the top left
corner and reads the first column from top to bottom
– It next reads the second column from top to bottom, and so
on
• Either method, rung or column, is appropriate.

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-12

2-6
Rung scanning

RUNG 1 2 3 4 5 6
1

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-13

Column scanning

1 2 3 4 5 6
RUNG
1

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-14

2-7
Two-rung ladder logic program

On Part Spray
switch sensor paint
1

Paint
empty
2

Operator
alarm
Conveyor
stopped

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-15

Two-rung ladder logic program


CPU Digital Digital
input output
module module
Input
Image
User Alarm
program light
Output
image

Operator Part Spray


control sensor painter
switch
Paint
Paint level
sensor
Zero speed sensor Motor
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 2-16

2-8

You might also like