We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 25
fu. PROGRAMMABLE LOGIC CONTROLLER
% Necessity is the mother of invention. Programming logic controller
(PLC) invention is yet another example that supports this truth. A
Programmable Logic Controller or PLC for short, is simply a special
computer device used for industrial control systems. The etymology
of this innovation of electronics research is very simple and
interesting.
%* In late 1960's, General Motors were in a find of an alternative
mechanism for analog relays in control circuitry. Engineers developed
a standard machine controller that is capable of performing the task
of analogy relays. In simple terms, it can be termed as a significant
evolution in the industria! automation revolution.
Basic functionality
* = It performs logic functions of relays, timers, counters and sequencers.ions of a PLC
44. Fun
A PLC is a microprocessor-
based controller with ———————___——
muliple inputs and outputs: ae
It uses a programmable t
‘memory to store instructions | "pus area ska
and carry out functions t» | ———*] Presrammnt i
ie
control machines and | ——*|_contor
Processes. It has the
advantages such as low cost, Fig. 4.22: Typical PLC
reliabitity and
re-progranmabiiy. 4 The components that make a PLC work can be divided into tree
core areas,
Yk The power supply and rack.
‘Ye The central processing unit.
$e Inputs and Oupats
%& PLCs are available in many shapes and sizes. They vary from a
Sal sie (ex: posket sie) to Hote large PLCS, which ean ot
‘uch larger systems. Smaller PLCs are typically designed
VO points,4.15. BASIC STRUCTURE
Exterat_ Environment
a
|
I
Fig, 4.24: PLC Architecture3 The architecture is open, so that it can be easily connected to other
devices and programs. Fig. 4.24 represents the basic internal
architecture of a PLC, This consists of a central processing
unitsmemory and inpuVoutput circuitry. The CPU operates upto 8
MHZ. This decides the operating speed of the PLLC. Digital signals
carry the information within a PLC, Buses are used to carry these
signals. Bus sefers to a group of conductors or wires which carries
electrical signals.
* PLC architecture's detailed representation is shown in the Fig. 4.25.
This structure is explained in the subsequent sections.Buiter} Chats
(Ort) [Dave
lcouptee} otertoce
ett
Input Channels. [omnes .
Output Channots
Fg. 4.25: Detailed Internal Diagram of PLE
‘CPU is the unit of the microprocessor. This interprets the input signals
And performs the contol actions, in accordance with the program
Stored in the memory. ‘The power supply unit is needed to convert
ns a.c. voltage 10 the low dic. voltage of 5 Volts. Bus
sm facilitates the transfer of data, address and control
Mormation. Dedicated mnemory section (RAM and ROM) helps inthe data manipulation and storage. Programming is carried out to key
in the program into the memory of the processor. In device, the
program will be developed and then will be transferred to memory.
The input and output sections help the processor to receive
information from external devices and vice versa. ‘The communication
interface is used to receive and transmit data on communication
networks from or to other remote PLCs.
he CPU
%& Central Processing Unit in general consists of arithmetic and logic
unit (ALU), memory and control unit. ALU is used for arithmetic and
logical operations execution. Memory comprises of set of registers
those store the data. A control unit is useful in controlling the time
of operations
4.15.2, The Memory
+k The functiortality of any memory is to store the data, There are several
methods of storing data in computing systems. ROM.and RAM are
two prominent hardware units those can be taken as examples of
memory. In PLC, there are three basic memory elements, namely,
system ROM, RAM for user and RAM for data.2 System ROM stores operating system related data and also the oe
data used by the central processing system. EPROM is 8 category of
ROM, where it ean be programmed and erasable. RAM for user stores
the program. RAM for data is also known as register table. Data in
the RAM can be altered. A portion of this RAM is Used to, store the
values of counters and timers, another partis used for input and output
addresses. In PLC, an exclusive battery is used to maintain the
contents of this RAM. Buffer also stores the data temporarily.
- Buses.
“Buses are used for the transfer of the data. These are the
which PLC communicates. The data transferred is binary
‘The binary digit ean be zero or one (0 or 1). Such 8 bits
as a byte. A typical PLC has four buses
means by
in nature.
are known
‘They are data bus, addressbus, control bus and system bus. Data bus transfers the CPU data,
For example, an 8 bit microprocessor handles eight bits of data using
its data bus.
Each memory location possesses unique address. Address bus carries
the address of the memory locations. For.example, an 8 bit adgiress
bus can locate 256 (28) memory locations. The control -bus carries
timing and control signals of the, CPU.:The.control: bus-is significant
in ensuring the synchronization among the elements of this computing
system. System bus is used io wansfer the data between the 1/0’ Pons
and VO units.Inpavoutput section
Ok This section acts as an interface between the system and surroundings,
‘This section interface the actuators and sensors to the CPU and
siemory as shown in the Fig. 4.26. Typically, a PLC system has the
basic functional components of processor unit, memory, power supply
‘nit, inpavouipot interface section, communication interface and the
Programming device
=
[Meron] aE
\4
Le sc
Fig. 426: UP and Units in a PLC System
PC for Programing
Pus
Optical teotation
% This section also enables sensors
ireely without needing extea ciscui
plo-isolators as shown in the
‘nd actuators. 10 be connected
iuy. This isolation is offered by
ig. 4.26. In a typical optical isolator,the gap between the LED and photo transi3tor provides necessary
electrical isolation. This is because, when a digital signal is received
by a LED, infrared radiation will be produced. This signal is detected
by the photo transistor.
% The inputs are normally from switches or sensors, such as |
photo-clectric cells or temperature sensors or flow sensors. The
outputs drive motor starter coils, solenoid valves and many others.
iPower Flow
Left Power ———— Right Power
Rail Rail
Rung 4
Rung 2
Rung 3
Rung 4
END} End Rung
Fig. 4.35: Scanning of Ladder
Diagram or Ladder ProgramNormally open contact ---| fe-
\ Normally closed contact ---| / f-- —+ / Lt
mele ‘ON than the ool sista is ON ---( VE ce —{ }—-
Fig. 4.36: Fundamental Symbols of Ladder ProgrammingInput
tO
Input
Output
Output
oS
Fig. 4.37: The Rung of a Ladderano Gre
Table 4.1: AND gale truth table
ame Input A. Input B ‘Output,
3 7 a
‘The ladder logie equivalent for an AND function looks like wo nonin
contacts side by si
ae
bee]
ANDOR Gate
1% OR logie is like addition
‘The truth table below shows that the output
is tumed ON when any
of the inputs are trv
‘Table 4.2: OR gate truth table
Input A] Input B [Output
0 0 0
7 o v
o T 7
T T T
The ladder logic equivalent
for an OR function looks like
{0 normal contacts on top of
each other
ok Thus for the OR gate we have
a scenario where two switches
fre connected in parallel and
are energized by input voliage
as shown in the Fig. 448.Nor Gate
‘Table 4.3: NOT gate truth table
Input A ‘Output
0 1
1 °
The ladder Togie-e
contact but with a slash through it
function looks like a norma
Ladder logie of NOTLatching
The term latch is used for the
circuit to carry out Tatching
gperation Te inaintains its state
until next_input is réccived.
is shown in Fig, 4.56. When
the input A contacts close,
there is~an_ 1_output._Howeve However,
when there is an output, auother
sstel onieae eae the output close:
an OR logic gate system with the input contacts. _ Tht
jl] maintain the ‘output.
i
To Telease the output is by operating the
Se
Input A Input B Output
ES
Fig. 4.56: Ladder Diagram of Latch
These contacts form
ally closed contact B.
sae ei ecLet us consider a motor
~CoMrolled by stop and start sao een M50
push button switches. Here one
signal light must be illuminated HA =
when the power is applied to the Output
motor and another when itis not Contacts
applied. Fig. 4.57 shows the ed
adder diagram with Mitsubishi
nos Lane fo Powe
Output Contacts net Applied
X401 is closed when the ¥430 Yast
Eran Is started. When X400
issmomrentarily closed, ¥430 is XK
energized and its contacts Lamp for Power|
Sose—Ths results im Tatching Ouiput Contacts —
altd-also-the-switching-OFF of 6
and the switching ON of a =
Y432—-To switch the motor
OFF, X401 is pressed and
opens. Y430 contacts open in
the top rung and third rung,
but close in the second sung. Thus Y431 comes on and Y432 OFF.
Fig. 4.57: Laddor Diagram of the
Application of Latching423. TIMERS, COUNTERS AND INTERNAL RELAYS
% Timers, Counters and Intemal relayMa, je the integral components of
a typical control system. Many controlling operations require time
bounded task management. For ex: A water pumping motor in the
field should be controlled in time otherwise the water gets wasted.
Therefore, PLC should be incorporated with timers. These timers
should be the functions of systems CPU clock signal. This section
deals with the way these timers are programmed in PLCs.
* Various manufactures of PLCs have distinct features of timers. Some
of them treat timers as delay blocks. A most generic method is to
Consider these timers to behave like relays with the coils. TheFig. 4.65 (Lop) shows the
timer is an output
control, which is being used
with a pair of contacts,
Fig. 65 (bottom)
represents the timer withthe
delay block.
Another classification of
timers is on-delay timers
and off-delay timers
Onedelay timers clicks after
3 particular time delay as
shown in the Fig, 4.66
Off-delay timers. aceurs for
a fixed period of time
before tumoff as shown in
the Fig. 4.67. Next category
is the pulse timer, it
switches ON or OFF for a
fixed period of time as
shown in the Fig. 4.68.
Hl bs Loe,
Timer
outpu ——L
Fig. 4.66: On-Delay Timer
Ik Preset is the time for whieh
the timer is SET. This is
done in moliples of the time
base, These tine bases are
100
milliseconds, 10 seconds and
100 milliseconds. Suppose a
in 10 milliseconds.
a
oe,
Fig. 467: OFf-Delay Thmor
timer is set with the preset value of 9 with a time base of 100
milliseconds, it i8 a time of 900 miliseconds.
=
Fig, 4.68: Pulse TneProgramming timers
2 A ‘Tat the reset input resets the timer, whether it is running or not.
Techniques for the entry of preset time values vary. Often it requires
the entry of @ constant K command followed by the time interval in
multiples of the time base used. Suppose K is 5. The instruction list
of a typical timer is as follows:
LD x400 Input int Timer
oo x400 TASKS
- C)
LD T4s0 Timer Output
OUT 430 Wr 7s
.69 represents timer NZ
cirenit ladder diagram.
Fig. 4.69: Timer Circuit (Mitsubishi)
On-off cycle = ~ ——Counters
€
A
2 PLCs have built in counters, These counters are used to count the
number of occurrences. These are used in various applications of day
to day life such as number of passengers passing through a security
gate.
2 A counter is set to some preset number value and, when this value
of input pulses has been received, it will operate its contacts. ‘There
are two types of counters, namely, down counters and up counters.
Down counters countdown from the preset value to zero. When the
counter reaches the zero value, its contacts change state, Most PLCs
offer down counting,
Up counters count from zero up to the preset value. When the counter
Feaches the set value, its contacts change the state. The choice of
the counters is divergent for different manufacturers of PLC.* Counters are also considered Int Counter
to consist of two basic
elements: one relay coil to )
count input pulses and one to
reset the counter. The In2 eee
associated contacts of the a
counter are being used in
other rungs. Fig.4.78 shows
F es Counter ou
the different activation states |
of the counter and Fig. 4.79
is ladder diagram of a typical |
counter.
Fig. 4.79: Basic Counter
vunter application Ladder DiagramRelays
These are one of the elements giving special built-in functions with
PLCs and are very widely used in programming. A small PLC might
have a hundred or more internal relays, some of them being battery
backed. This helps in situations of ensuring safety in. shut down of a
plant in the case of power failure.
Electromagnetic latching relays are designed to hold the relay closed
after power has been removed from the coil. Latching relays are used
where it is necessary for contacts to stay open and/or closed. A
latching relay uses two coils. The latch coil is momentarily energized
to set the latch and hold the relay in the latched position. The unlatch
or release coil is also momentarily.
i ave like relay’:
In PLCs there are elements such as bits those behave like 7
‘ off
These are called internal relays as they can be switched on oFand switch othet devices ON or OFF, Such internal relays do not
exist ike switching devices. They are just bits in the slorage memory
those act like relays.
For programming, they can
bbe treated in the same way
as an external relay output
and input. So inputs to
‘extemal switches can be used
to give an output from an
internal relay. ‘This then
results in the internal relay
contacts being used, in
conjunction with other
external input switches to
give an output.
Internal Relay Coll
Energising the
Coil Activates
the Contacts
Ie
Internat Relay
Contacts
Fig. 4.82: Internal Relay
‘A program of internal relay can be divided into two segments. In one
rung, inputs to external inputs activate the intemal relay ouput, In
another ung, internal relay contacts are activated and there by controls
the output.
To distinguish internal relay outputs from external relay outputs, they
are given different types of addresses. Different manufacturers tend
to use different terms for intemal relays Mitsubishi uses the term
auxiliary relay or marker and
the notation M100, MIOI, etc