You are on page 1of 58

Programmable Logic Controllers

prv
Contents
Evolution of PLC
Principle of Operation
Architecture of PLC
Working of PLC
Programming the PLC
Some Examples and questions

To be continued.

2 prv/PLC and its applications
What is automation?
The term automation is used to describe the
automatic operation or control of a process.
In modem manufacturing there is an ever increasing
use of automation, e.g. automatically operating
machinery, with virtually no human intervention.
Also, in appliances around the home and in the office
there is an ever increasing use of automation.
Automation involves carrying out operations in
the required sequence and controlling outputs
to required values.
3 prv/PLC and its applications
How to make something automated?
prv/PLC and its applications 4
Manual Control
Hard wired control
Electronic control using
logic gates
Processor based control
Microprocessor &
Microcontroller
Programmable Logic
Controllers
Personal Computer based
Control


Consider these two pictures!
prv/PLC and its applications 5
Relay panel for Logic Control PLC for Logic Control
Requirements of a solid state system
prv/PLC and its applications 6
The specifications required a solid-state system
with computer flexibility able to
survive in an industrial environment
be easily programmed and maintained by plant
engineers and technicians, and
be reusable.
Definition of a PLC
prv/PLC and its applications 7
Programmable logic controllers, also called
programmable controllers or PLCs, are solid-
state members of the computer family, using
integrated circuits instead of electromechanical
devices to implement control functions.
They are capable of storing instructions, such as
sequencing, timing, counting, arithmetic, data
manipulation, and communication, to control
industrial machines and processes.
In essence
prv/PLC and its applications 8
Advantages of using a PLC
prv/PLC and its applications 9
Flexibility
Lower cost
Pilot running
Speed of operation
Programming Language
Reliability and
Maintainability
Simplicity of control
system components
Implementing changes
and correcting errors
Security
Ease of changes by
reprogramming
Newer Technology
Fail safe operation
Fixed circuit operation
Environmental
consideration
Large quantities of
contacts
Documentation

Consider what is happening here
prv/PLC and its applications 10
Principle of
Operation
Two basic sections:
(i) Central Processing
Unit
(ii) Input Output
Interface Unit.
prv/PLC and its applications 11
Central Processing
Unit

Processor


Memory



Power Supply

prv/PLC and its applications 12
Operational sections of a PLC CPU
prv/PLC and its applications 13
Central Processing
Unit
prv/PLC and its applications 14
The internal structure of the CPU depends
on the microprocessor concerned. In
general they have:
An arithmetic and logic unit (ALU) which is responsible
for data manipulation and carrying out arithmetic
operations of addition and subtraction and logic
operations of AND, OR, NOT and
EXCLUSIVE-OR.
Memory, termed registers, located within the
microprocessor and used to store information
involved in program execution.
A control unit which is used to control the timing of
operations.
Architecture of CPU of a PLC
prv/PLC and its applications 15
The Buses
The system has
four buses:
Data bus

Address bus

Control bus

System bus
prv/PLC and its applications 16
The buses are the paths used for
communication within the PLC.
The information is transmitted in
binary form, i.e. as a group of bits with
a bit 6 Programmable Logic Controllers
being a binary digit of 1 or 0, i.e.
on/off states.
The term word is used for the group of
bits constituting some information.
Thus an 8-bit word might be the binary
number 00100110. Each of the bits is
communicated simultaneously along its
own parallel wire.
PLC Memory
prv/PLC and its applications 17
Chip Fixed (F) or
Alterable
Application Erasable by
ROM F Fixed operating memory No
RAM A User Program No
PROM F User Program No
EPROM A User Program UV light
EEPROM A User Program Electrical Signals
NOVPROM A User Program Electrical Signals
PLC Memory
prv/PLC and its applications 18
System read-only-memory (ROM) to give permanent storage for the
operating system and fixed data used by the CPU.
Random-access memory (RAM) for the users program.
Random-access memory (RAM) for data. This is
where information is stored on the status of input
and output devices and the values of timers and
counters and other internal devices. The data RAM is
sometimes referred to as a data table or register table.
Possibly, as a extra module, erasable and programmable read-
only-memory (EPROM) for ROMs that can be programmed and
then the program made permanent
PLC Power Supply
Module
prv/PLC and its applications 19
Can you understand this diagram?
prv/PLC and its applications 20
Input and Outputs
Inputs are devices that
supply a signal/data to a
PLC.
Typical examples of
inputs are push buttons,
switches, and
measurement devices.
Outputs are devices that
await a signal/data from
the PLC to perform their
control functions.
Lights, horns, motors,
and valves are all good
examples of output
devices.
prv/PLC and its applications 21
Input Output Interface
prv/PLC and its applications 22
Input/Output Units
Opto Isolator
prv/PLC and its applications 23
The input/output channels
provide isolation and signal
conditioning functions so that
sensors and actuators can often
be directly connected to them
without the need for other
circuitry.
Electrical isolation from the
external world is usually by
means of optoisolators (the term
optocoupler is also often used).
Functions of the
Input Module
It senses the presence or absence of
an input signal at each of its input
terminals.

It converts the input signal to a level
usable, understandable by the CPU.

The input module carries out
electronic isolation.

Its electronic circuit must multiplex
the inputs continuously.

prv/PLC and its applications 24
PLC Input Module Layout
prv/PLC and its applications 25
Output Module
prv/PLC and its applications 26
A DC signal from the CPU is
converted to a usable output
voltage, either AC or DC.
Isolation again is necessary
The module also de-multiplexes
the output from CPU
NOTE: All terminals of a single
module have the same output
system. In other words, an 8
terminal module would not have
some AC and some DC outputs
or voltages of differing values.

PLC Output Module Layout
prv/PLC and its applications 27
PLC I/O diagram
prv/PLC and its applications 28
PLC Product
Module Ranges


1. micro PLCs
2. small PLCs
3. medium PLCs
4. large PLCs
5. very large PLCs
prv/PLC and its applications 29
How does the PLC
work?



Receive the Input signal
Process the Input signal
Give the output
prv/PLC and its applications 30
I/O Bus

Field
Signals




Input
module

CPU







PII PIQ


CPU






PII PIQ




Output
Module



Field
Controls
Scan Cycle of a
PLC
When the inputs to
the PLC are scanned
the physical input
values are copied into
memory.
When the outputs to
a PLC are scanned they
are copied from
memory to the physical
outputs.
When the ladder logic
is scanned it uses the
values in memory, not
the actual input or
output values.
prv/PLC and its applications 31
During the Scan
prv/PLC and its applications 32
This is how PLC
work



You need a
program to link
your input with
output!
prv/PLC and its applications 33
Programming Languages
prv/PLC and its applications 34
Ladder Logic Diagrams
Functional Block Diagram
Statement List
High level Languages
Ladder Logic
Diagram
The logic is usually separated into
small, easy to understand pieces
that are often called rungs or
networks.
Contacts - represent logic input
conditions analogous to switches,
buttons, internal conditions and so
on.
Coils - usually represent logic
output results analogous to lamps,
motor starters, interposing relays,
internal output conditions and so on.
Boxes - represent additional
instructions such as timers,
counters, or math instructions.
prv/PLC and its applications 35
Functional Block
Diagram
These are instructions as
logic boxes that resemble
common logic gate diagrams
resembling box instructions.
The program logic is
derived from the
connections between these
box instructions.
That is, the output from
one instruction (such as an
AND box) can be used to
enable another instruction
(such as a timer) to create
the necessary control logic.
prv/PLC and its applications 36
Statement List
The STL editor also
allows creating programs
that could not be
created with Ladder
Logic or Function Block
Diagram editors.
This is because the
STL program is in the
native language of the
CPU, rather than in a
graphical editor where
some restrictions must
be applied in order to
draw the diagrams
correctly.

prv/PLC and its applications 37
Grafcet
Grafcet (Graphe
Fonctionnel de
Commande tape
Transition) is a
symbolic, graphic
language, which
originated in France,
that represents the
control program as
steps or stages in the
machine or process.
The English
translation of Grafcet
means step transition
function charts.
prv/PLC and its applications 38
BIT LOGIC Programming
prv/PLC and its applications 39
Identify the difference!
prv/PLC and its applications 40
It is the identification!
prv/PLC and its applications 41
Classical case! What is the solution?
prv/PLC and its applications 42
What is the catch here?
prv/PLC and its applications 43
Logical OR operation
prv/PLC and its applications 44
NOT operation
prv/PLC and its applications 45
Latched circuit
What is happening
to the output here?
prv/PLC and its applications 46
Power Continuity in a rung
prv/PLC and its applications 47
Well Spot the difference!
prv/PLC and its applications 48
Q 0.0
Q 0.0
I 0.0
I 0.1
Q 0.0
Q 0.0
I 0.0
I 0.1
Convert this logic into a program
prv/PLC and its applications 49
L
S1 S2
S3
S4

S6

S5

Answer has two parts!
prv/PLC and its applications 50
I 0.3
Q 0.0
I 0.0
I 0.1
I 0.2
I 0.4
I 0.5
I /O ASSIGNMENTS
S1 I0.0
S2 I 0.1
S3 I 0.2
S4 I 0.3
S5 I 0.4
S6 I 0.5
S7 I 0.6
Q I 0.0
Can you answer this problem?
prv/PLC and its applications 51
A temperature control system consists of three
Bimetallic Thermostats (Thermostats are de-
energized (LOW) when the set point is reached).
The system operates three heaters. Thermostats are
set at 50, 60 and 70 C. Below 50 C three heaters
are to be on. A temperature between 50 to 60 C
causes two heaters to be on. For the temperature
between 60 and 70 C only one heater is to be on.
Above 70 C all the heaters should be off. A safety
shutoff should be energized when the temperature
reaches 80 C makes all three heaters off in case one
stays on by mistake. A master switch turns the
system on and off.
Answer!
prv/PLC and its applications 52
Do not ask me how. You have just listened to it!
M 0.0
I 0.0
M 0.0
I 0.1
Q 0.0
M 0.0
I 0.2
Q 0.1
M 0.0
I 0.2
Q 0.2
I 0.4
I 0.4
I 0.4
I / O ASSIGNMENTS
MASTER SW I0.0
TH1 I 0.1
TH2 I 0.2
TH3 I 0.3
SAFETY SW I 0.4
HEATER1 Q 0.0
HEATER2 Q 0.1
HEATER3 Q 0.2
Applications of PLC
prv/PLC and its applications 53
Advantages of PLCs
prv/PLC and its applications 54
References
W. Bolton, Programmable Logic Controllers, Fourth
Edition, Newnes, 2006. (ISBN-13: 978-0-7506-8112-4)
John W. Webb, Ronald A. Reis, Programmable Logic
Controllers, Principles and Applications, Fifth Edition,
Prentice Hall of India, 2003. (ISBN-81-203-2308-4)
I.A. Bryan, E.A. Bryan, Programmable Controllers
Theory and Implementation, Second Edition, An
Industrial Text Company Publication,1997, ISBN 0-
944107-32-X
John R. Hackworth, Fredrick D. Hackworth Jr.
Programmable Logic Controllers: Programming Methods
and Applications

55 prv/PLC and its applications
References
prv/PLC and its applications 56
Madhuchandra Mitra, Samarjit Sen Gupta,
Programmable Logic Controllers and Industrial
Automation, an Introduction, Penram
International Publishing (India)P Limited, 2005,
ISBN: 81-87972-17-3
Gary Duning, Introduction to Programmable
Logic Controllers, 2
nd
Edition, Thomson Delmar
Learning, 2005, ISBN 0 7668 1768 -7


Have any?
prv/PLC and its applications 57
Thanks for listening
A passing thought
prv/PLC and its applications 58



Never assume the obvious is true

You might also like