CHAPTER - INTRODUCTION TO PLCS
Advantages of PLCs
Cost effective for controlling complex systems.
Flexible and can be reapplied to control other
systems quickly and easily.
Computational abilities allow more sophisticated
control.
Trouble shooting aids make programming easier and
reduce downtime.
Reliable components make these likely to operate for
years before failure.
PLC Origin
- Developed to replace relays in the late 1960s
- Costs dropped and became popular by 1980s
- Now used in many industrial designs
Relays and
Schematic
Symbols
in p u t c o il
O R
n o r m a lly
c lo s e d n o r m a lly
open
O R
Logical Control 115VA C
wall plug
with Relays
relay logic
output C
input A input B
(normally open) (normally open)
(normally closed)
A B C
ladder logic
push buttons
Relay Logic
In a PLC power
supply
+24V
com.
PLC
inputs
ladder
logic
A B C
outputs
115Vac light
AC power
neut.
Reading Ladder Logic
HOT NEUTRAL
A B X
C D G Y
E F H
INPUTS OUTPUTS
Note: Power needs to flow through some combination of the inputs
(A,B,C,D,E,F,G,H) to turn on outputs (X,Y).
A Ladder Logic Example
A B
B Note: When A is pushed, the output B will turn on, and
the input B will also turn on and keep B on perma
nently - until power is removed.
Note: The line on the right is being left of f intentionally
and is implied in these diagrams.
0 0 0 0 0 LD N A
0 0 0 0 1 LD B
0 0 0 0 2 A N D t h e m n e m o n ic c o d e is e q u iv a le n t t o
t h e la d d e r lo g ic b e lo w
Mnemonics 0
0
0
0
0
0
0
0
3
4
LD
LD
C
D
0 0 0 0 5 A N D
0 0 0 0 6 O R
0 0 0 0 7 ST X
0 0 0 0 8 EN D
A B X
C D
EN D
N o t e : T h e n o t a t io n s h o w n a b o v e is SO R
n o t s t a n d a r d A lle n - B r a d le y BST
n o t a t io n . T h e p r o g r a m t o t h e X IC A
r ig h t w o u ld b e t h e A - B e q u iv a X IO B
le n t . N X B
X IO C
X IO D
BN D
O TE X
EO R
EN D
SFCs
Start
power up Execution follows
multiple paths
flash
power down
End
Structured Text
i := 0 ;
REPEA T
i := i + 1 ;
U N T IL i > = 1 0
EN D _R EPEA T;
PLC in a Control Loop
PROCESS
Feedback from Connections to
sensors/switches actuators
PLC
The Four Stages of a PLC Scan
PLC program changes outputs
by examining inputs Set new outputs
THE Power turned on
CONTROL
LOOP
Process changes and PLC pauses
Read inputs while it checks its own operation
Ladder Logic Inputs
Normally open, an active input x will close the contact
and allow power to flow.
Normally closed, power flows when the input x is not open.
x
IIT
immediate inputs will take current values, not those from
the previous input scan. (Note: this instruction is actually
an output that will update the input table with the current
input values. Other input contacts can now be used to
examine the new values.)
Ladder Logic Outputs
When power is applied (on) the output x is activated for the left output, but turned
off for the output on the right.
x x
An input transition on will cause the output x to go on for one scan
(this is also known as a one shot relay)
x
OSR
When the L coil is energized, x will be toggled on, it will stay on until the U coil
is energized. This is like a flip-flop and stays set even when the PLC is turned of f.
x x
L
U
Some PLCs will allow immediate outputs that do not wait for the program scan to
end before setting an output. (Note: This instruction will only update the outputs using
the output table, other instruction must change the individual outputs.)
x
IOT
Note: Outputs are also commonly shown using parentheses ’-( )-’ instead
of the circle. This is because many of the programming systems are text
based and circles cannot be drawn.
Sample Problem:
Try to develop (without looking at the solution) a relay
based controller that will allow three switches in a room
to control a single light.