What is a Programmable Logic Controller?
A programmable logic controller ( PLC) is a digita l
computer used for automat ion of
electromec hanica l processes, such as control
of machinery on factory assembly lines,
amuseme nt rides,or lighting fixt ures.
PLCs are used in many industries and machines.
Definition of PLC
(Definition according to NEMA standard ICS3-1978)
A digitally operating electronic apparatus which uses
a programming memory for the internal storage of instructions
for implementing specific functions such as logic,
sequencing, timing, counting and arithmetic to
control through digital or analog modules, various types of
machines or process.
Block Diagram of
PLC
Programmi
ng.devi lProgram & Com.TI!.
ce data 1n e
Dunica.tions
ace
memory
u Outp l-
t Process wt
inte or inter
r -
fat:e face
Power
su;pp
1/0 Section Input field devices
I
I
Input Module I
Common ()
-- () I
Power n
v-
Bus Q_ p
- u
o. t
Forms the interface by _ -- ( )
Relay contacts I-
m
which input field devices are User Pushbuttons - 0
d
power supply Limit switches - u
connected to the Analog sensors - I
Selector switches -
controlIer.
e
Common Return Bus
The terms "field" and
"real world" are used
to distinguish actual
external devices that
1/0 Section
Output Module Output field
devices
); Forms the interface by
;: which output field
0
- u
devices are connected t
p
to the controller. u Commo
t ..-- ---- Return n
); PLCs employ an optical
Bu
;: isolator which m s
Relay
- 0
light uses to d
sMotor User
starters power
the internal
isolate electrically u Solenoid
supply
I valves
Indicator
components from e lights
LED
input and the displays
terminals. output
Programming Device
PC with appropriate
software
C
l § Cl 1§§1 BSa 1§ Software
§1
•I
I
I I I
PF
0
I
/A ' l.:11 t 1
l. A
1111 · 1\. . :
./ A personal (PC) is the most commonly used
computer programming
./ The
device. personal computer communicates with the
PLC processor via a serial or parallel data communications
link.
./ The computer monitor is used to display the logic on the
screen.
Memory in PLC
EX ECUTI VE M EM ORY
- ROM
S YSTEM M EM ORY
- RAM
110 STATU S M EM ORY
- RAM
DATA M EM ORY
-RAM
USER M EM ORY
-RAM I EPROM I EEPROM
Fig. 4 : Typica l PLC memory utilization map
*
Types of
PLC
Fixed PLC:
PLC has all of its components-the input
A Fixed
associated memory, power
section, CPU
section-built into one self-
supply, and and
containedoutput
unit.
into the
All input and output terminals are built
PLC package and are fixed,not removable.
Types of
PLC
Modular PLC:
The modular PLC comes as pieces.
A
separate modular PLC is purchased piece
byThere
piece. may be two or three power supplies
to choose from,a handful of different
processors (CPUs), many separate
input and output cards or modules,and
selection of assemblies,called racks, chassis, or
base plates to hold the pieces together.
Block diagram of AC input module
I I
lnput Bridge Noise & Threshold uptical
Input
Signal Rectifier Debounce Detector Isolation Logi CP Status
c
- Filter I
I
U Table
LE
D
AC Input Module Specifications
Points per common: This is the number of input points
that share the same common connection. As an
example, one 16 point input module could have all
input points sha ring one common, and a different 16
point input module might have two groups of 8 input
points. Each group of 8 would have its own sepa rate
common.
AC Input Module Specifications
Backplane Current Draw: Each module takes power
from the PLCs power supply to operate the electronics
on the module. This specification will be
used when calculating power supply loading.
Maximum signal delay: Signal delay is the time it takes for
the PLC to pick up the field input signa l, digitize it,
and store it in the memory. This spec ification is usually
listed for signa l turning on and for a signal turning off.
AC Input Module Specifications
Nominal input current: this is the current drawn by an input
point at nominal input voltage.
Maximum Inrush Current: this is the maximum inrush
current the module can handle.
Maximum off state current: this is the maximum
amount of current, typically from leakage from a solid
state input device, that a module can accept while
remaining in an OFF state.
Block diagram of DC input module
+
lnput Power Noise & Threshold Optical Input
Signal Conversio Debounce Logic CP Status
Detector Isolation
n Filter U Table
LE
D
DC Input Module Specifications
)o:- Maximum Off state current: This is the maximum
amount of leakage current allowed in an input circuit
from an input device that will keep the input circuit
in an OFF state.
Block diagram of AC output Module
Fus
Signal Latch Triac e Controlled
Optical Filter
From Logic Switching Device
Isolation
CPU Circuit Circuit
/'
LED
'-
Block diagram of DC output module
Power Fus
Signal Latch Transistor e Controlled
From
Optical Filter
Logic Isolation Switching Device
CPU Circuit Circuit
LED
"'
Programming
Languages
> Diagram (LD): graphical depiction of a process
Ladder a
with rungs of logic, similar to the relay ladder
logic schemes that were replaced by PLCs.
> Sequential Function Charts (SFC): a graphical
depiction of
interconnecting steps,actions,and transitions.
> Instruction List (IL): assembler type,
text based language for building small
Programming Languages
> Function Block Diagram (FBD): a graphical depiction of
•
process flow using simple and complex
interc onnecting blocks.
> Structured Text (ST): a high-level, text-based language
such as BASIC, C, or PASCAL specifically developed
for industria l control applications.
PLC Ladder
Programming
>- A very commonly used method of programming PLCs
is based on the use of ladder diagra ms.
>- Writing a program is then to drawing
a
equiva lent switching circuit.
>- The ladder diagra m vertical lines
consists of two representing the
power rails.
>- Circuits are connected as horizontal lines,that is,the
rungs of the ladder,between these two verticals.
Relay Type Instructions
Sr.No. Instruction Description
1 XIC Examine if closed
2 XIO Examine if open
3 OTE Output Energize
4 OTL Output Latch
5 OTU Output Unlatch
Fundamental Symbols
Examine If Closed (X Examine If Open (XIO)
IC)
-]![-
Figure : Relay Contact Figure : Relay Contact
Output Energize (OTE)
-(
Figure : Relay Coil
OTL and OTU Instructions
Instruction Name Symbol Description
OTL Output ---{ L }-- OTL sets the bit to "1"
Latch when the rung
becomes true and
retains its state when
the rung loses
continuity or a power
cycle occurs.
OTU Output ---{ u }-- OTU resets the bit to
Unlatch
"O" when the rung
becomes true and
retains it.
Timer Instructions
Sr. Instruction Name Description
No.
1 TON On Delay Timer Counts time-based intervals when the
instruction is true.
2 TOF Off Delay Timer Counts time-based intervals when the
instruction is false.
3 RTO Retentive Timer Counts time-based interva ls when
the instruction is true and retains the
accumu lated value when the
instruction goes false or when
power cyc le occurs.
4 RES Reset Resets a retentive timer's
accumulated value to zero.
Counter Instructions
Sr. Instruction Name Description
No.
1 CTU Up counter Increments the accumulated value at
each false-to-true tra nsition and
retains the accumulated va lue when
an off/on power cycle occurs.
2 CTD Down counter Decrements the accumulated value at
each false-to-true tra nsition and
retains the accumulated value when
an on/off power cycle occurs.
3 HSC High Speed Co,unter Counts high-speed pulses from a high-
speed input.
4 RES Reset Resets a counter's accumulated value
to zero.
Logical Instructions
Sr.
Instruction Name Description
No.
1 A Logical
Perform Bitwise AND
ND AND operation
Perform Bitwise
2 O Logical
R OR operation OR
Perform Bitwise
3 XO Logical
R XOR operation XOR
Logical Instructions
Sr. Instruction Name Description
No.
4 NOT Inversion Perform 1nvers1 on of
• •
gi ven source
•
5 CLR Clear Clear destination
AND - Logical AND Instruction
--AND
BITWISE
AND
B3:0
Source A
Source B B3:1
Destination B3:2
)- The AN D command is used to perform the logic
AND instruction on each bit of the value in source A with
each bit of the value of source B, storing the output logic
in the destination.
B3:0 00 0 0 0 0 0 0 0 0 1 0 1 0 1 0
B3:1 00 0 0 0 0 0 0 0 0 1 1 1 1 1 0
B3:2 00 0 0 0 0 0 0 0 0 1 0 1 0 1 0
OR - Logical OR Instruction
--OR
BITWISE INCLUSIVE
OR
Source A B3:
Source
B 0
Destination
B3:
); The OR command is used to perform the logic1OR instruction on each bit
:- of the value in source A with each bit of the value of source B, storing
- B3:
the output logic in the destination.
2
B3:0 00 0 0 0 0 0 0 0 0 1 0 1 0 1 0
B3:1 00 0 0 0 0 0 0 0 0 1 1 1 1 1 0
B3:2 00 0 0 0 0 0 0 0 0 1 1 1 1 1 0
XOR - Logica I XOR
Instruction --XOR
BITWISE EXCLUSIVE
OR
83:0
Source A
Source 83:
B 1
Destination
83:
2 logic XOR instruction on
The XOR command is used to perform the
each bit of the value in source A with each bit of the value of source B,
storing the output logic in the destination.
83:0 00 0 0 0 0 0 0 0 0 1 0 1 0 1 0
83:1 00 0 0 0 0 0 0 0 0 1 1 1 1 1 0
83:2 00 0 0 0 0 0 0 0 0 0 1 0 1 0 0