0% found this document useful (0 votes)
100 views79 pages

Basics of Programmable Logic Controller

A programmable logic controller (PLC) consists of a central processing unit that controls input and output modules connected to field devices. The PLC executes a user-created program to monitor inputs and control outputs based on the program's logic. PLCs offer advantages over conventional control panels like reduced wiring, easier troubleshooting and modifications, and increased productivity. PLCs can perform various control functions including sequence control, sophisticated control, and supervisory control.

Uploaded by

sam_al_gino375
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views79 pages

Basics of Programmable Logic Controller

A programmable logic controller (PLC) consists of a central processing unit that controls input and output modules connected to field devices. The PLC executes a user-created program to monitor inputs and control outputs based on the program's logic. PLCs offer advantages over conventional control panels like reduced wiring, easier troubleshooting and modifications, and increased productivity. PLCs can perform various control functions including sequence control, sophisticated control, and supervisory control.

Uploaded by

sam_al_gino375
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 79

PROGRAMMABLE LOGIC

CONTROLLER
Introduction

• What is a programmable Logic Controller?


• A PLC consists of a Central Processing Unit (CPU)
containing an application program and Input and
Output Interface modules,which is directly connected
to the field I/O devices.The program controls the PLC
so that when an input signal from an input device
turns ON,the appropriate response is made.The
response normally involves turning ON an output
signal to some sort of output devices.
Definition of Terms

• Central Processing Unit (CPU)-The Central


Processing Unit is a microprocessor that coordinates
the activities of the PLC system.It executes the
program,processes I/O signals and communicates
with external devices.
• Memory-There are various types of memory unit.It is
the area that hold the operating system and user
memory.The operating system is actually a system
software that coordinates the PLC.Ladder
program,Timer and Counter Values are stored in the
user memory.
• Read Only Memory (ROM)-ROM is a non-volatile
memory that can be programmed only once.It is
therefore unsuitable.It is least popular as compared
with others memory type.
• Random Access Memory (RAM)- RAM is commonly
used memory type for storing the user program and
data.The data in the volatile ram would normally be
lost if the power source is removed.However this
problem is solved by backing up the RAM with a
battery.
• Electrically Erasable Programmable Read-Only
Memory-EEPROM combines the access flexibility of
RAM and the non volatility of EEPROM in one.Its
contents can be erased and reprogrammed
electrically,however to a limited number of times.
Disadvantages of Conventional Control Panel
1.There are too many wiring work in the panel.
2.Modification can be quite difficult.
3.Troubleshooting can be quite troublesome as you may
require skillful technicians.
4.Power consumption can be quite high as the coil
consumes power.
5.Machine downtime is usually long when problems
occur,as it takes a longer time to troubleshoot the
control panel.
6.Drawings are not updated over the years due to
changes.It causes longer downtime in maintenance
and modification.
Advantages of PLC Control Panel
1.The wiring of the system usually reduces by 80% compared to the
conventional relay control system.
2.The power consumption is greatly reduced as PLC consume much less
power.
3.The PLC self diagnostic functions enable easy and fast troubleshooting
of the system.
4.Modification of the control sequence or application can easily be done
by programming through the console of computer software without
changing the I/O wiring,if no additional input or output device are
required.
5.In PLC system spare parts for relays and hardware timers are greatly
reduced as compared to conventional panel.
6.The machine cycle time is improved tremendously due to the speed of
PLC operation is a matter of milliseconds.Thus productivity increases.
7.It cost much less compared to conventional system in situation when
the number of I/Os is very large and control functions are complex.
8.An immediate printout of the PLC program can be done in
minutes.Therefore,hardcopy of documentation can be easily
maintained.
What a programmable controller can do?

Control Type
1.Sequence Control
2.Sophisticated Control
3.Supervisory Control
Sequence control Functions:

a.Conventional relay control logic replacer


b.Timers/Counters
c.PCB card controller replacer
d.Auto/semi-auto/manual control of
machine
Sophisticated Control Functions
a.Arithmetic Operations
b.Information handling
c.Analog control (temperature,pressure.etc.)
d.P.I.D. (Proportional-Integral-Derivative)
e.Servo-motor control
f.Stepper Motor Control
Supervisory Control
a.Process monitoring and alarm
b.Fault diagnostic and monitoring
c.Interfacing with computer (RS 232/RS 422)
d.Factory Automation Networking
e.Local Area Network
f.Wide Area Network
KEY POINTS TO KNOW WHEN USING
PROGRAMMABLE LOGIC CONTROLLER
I.Input
a.Number of Inputs
b.Type of inputs
II.Outputs
a.Number of outputs
b.Type of outputs
III.Memory
a.RAM –Random access Memory
b.EPROM-Erasable Programmable Read Only Memory
c.EEPROM-Electrically Erasable Programmable Read Only
Memory
IV.Peripherals
a.Handheld Programming Console
b.LSS-Ladder Support Software
c.PROM Writer
SCAN TIME

• The process of reading the inputs,executing the


program and updating the outputs is known as
scan.The scan time is normally a continuous and
sequential process of reading the status of
inputs,evaluating the control logic and updating the
outputs.Scan time specification indicates how fast the
controller can react to field inputs and correctly solve
the control logic.

I/O update

Program Scan
FACTORS INFLUENCING SCAN TIME

The time required to make a single scan (scan


time)vary from 1msec to 30msec.Scan time depends
on the length of the user program.The use of remote
I/O system increases the scan time as a result of
having to transmit the I/O update to remote
subsystem.Monitoring of the control program also
adds overhead time to the scan because the micro
has to sent the status of coils and contacts to other
monitoring device.
Photo sensors and pushbuttons ,in this
example,connected to PLC inputs,can be used to start
and stop a motor connected to a PLC through a motor
starter.
NUMBER SYSTEM
Decimal system:
Since a PLC is a computer,it stores information in the
form of ON or OFF conditions (1 or 0 ),referred to as
binary digits (bits).Sometimes binary digits are used
individually and sometimes they are used to represent
numerical values.
Various number systems are used by PLCs.All number
systems have the same three characteristics:
digits,base,weight.The decimal system,which is
commonly used in everyday life,has the following
characteristics:
Ten Digits :0,1,2,3,4,5,6,7,8,9,
Base :10
• The binary system is used by programmable controllers.The
binary system has the following charateristics:
• Two digits: 0,1
• Base :2
• Weights :Power of base 2 (1,2,4,8,16…)
• In the binary system,1s and 0s are arranged into
columns.Each column is weighted.The first column has a
binary weight of 2º.This is equivalent to a decimal 1.The
decimal value is doubled in each successive column.The
next column has weight of 2¹ which is equivalent to a
decimal 2.The decimal value is doubled in each successive
column.The number in the far left hand column is referred to
as the most significant bit.In this example the most
significant bit has a binary weight of 27.This is equivalent to
a decimal 128.
Converting a binary to decimal

• The following steps can be used to interpret a


decimal number from a binary value
1.Search from least to most significant values for 1s
2.Write down the decimal representation of each
column containing 1
3.Add the column values
Bits,bytes, and Word

Each binary piece of data is a bit.Eight bits make


up one byte.Two bytes,or 16 bits,make up one
word
Logic 0 and Logic 1
Logic 0 and Logic 1

• Programmable controllers can only understand a


signal that is on or off (present or not present).The
binary system is a system in which there are only two
numbers,1 and 0.Binary 1 indicates the signal is
present,or the switch is on.Binary 0 indicates that the
signal is not present, or the switch is off.
BCD-Binary Coded Decimal

• Binary Coded Decimal (BCD) are decimal numbers


where each digit is represented by a four bit binary
number BCD is commonly used with input and output
devices.A thumbwheel switch is one example of an
input device that uses BCD.The binary numbers are
broken into group of four bits, each group
representing a decimal equivalent.A four digit
thumbwheel switch,like the one shown here,would
control 16 (4x4) PLC inputs.
Thumbwheel switch
Hexadecimal System
• Hexadecimal is another system used in PLCs.The
hexadecimal system has the following characteristics:
• 6 digits 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
• Base 16
• Weights Powers of base (1,16,256,4096……)
• The ten digits of the decimal system are used for the first
ten digits of the hexadecimal system.The first six letters
of the alphabet are used for the remaining six digits.
• A= 10 D = 13
• B= 11 E = 14
• C= 12 F= 15
• The hexadecimal system is used in PLC
because it allows the status of large number
of binary bits to be represented in a small
space such as computer screen or
programming device display.Each
hexadecimal digit represents the exact status
of four binary bits.To convert a decimal
number to a hexadecimal number the decimal
number is divided by the base of 16.To
convert decimal 28,for example,to
hexadecimal 28/ 16 = 1 r 12
• Decimal 28 divided by 16 is 1 with a
remainder of 12.Twelve is equivalent to C in
hexadecimal.The hexadecimal equivalent of
28 is 1C.The decimal value of hexadecimal
number is obtained by multiplyng the
individual hexadecimal digits by base 16
weight and then adding the results.In the
following example the hexadecimal number
2B is converted to its decimal equivalent of 43.
• 160 = 1
• 16 1 = 16
• B = 11.
Conversion of Numbers
Conversion of numbers cont..
PLC SIGNALS
There are 2 major groups of I/O signals:
1.Digital signals are represented by only two states:
ON OFF
HI LOW
1 0
2.Analogue signals give a varying signal of either
voltage ( 0 –10 V) or current (4 – 20 ma) in
proportion to the element being
measured.e.g.temperature,flow,pressure,
PLC Input Equipment
DIGITAL INPUT A.2.Non-Contact
A.1.Contact
1.Proximity switch
1.Pushbutton Switch
2.logic output from
2.Selector Switch computer/numerical
3.Limit Switch controlled equipment
4.Photo Cell Relay A.3.pulse generating
5.Control Relay
1.rotary encoder
6.External timer/counter
contacts 2.linear encoder
7.thermal overload relay 3.tooth gear sensor
8.voltage or current relay 4.photo electric switch
PLC Input Equipment Cont…
B.Analogue Input B.2.Transducer
B.1.Sensor –amplifier 1.voltage
2.current
1.temperature
3.power
2,pressure 4.power factor
3.flow rate 5.frequency
4.load-tension B.3.Potentiometer
5,distortion 1.thickness
2.length
6.vibration
3.angle
B.4.Tacho-generator
1.speed
Block Diagram of PLC

Power Supply

Computer
Signals To
Signals From CPU Solenoids
Input Central Output
Switches Motors
Interface Processing Unit Interfac
Sensors e Heater
Memory
Etc. Lamps
Motor starter
Example of Digital input Connections
A normally (NO) pushbutton is used in the following example.One
side of the pushbutton is connected to the first PLC input.The other
side is connected to an internal 24VDC power supply.Many PLCs
require a separate power supply to power the inputs.In the open
state,no voltage is present at the PLC input.This is the off
condition.When the pushbutton is depressed,24VDC is applied to
the PLC input .This is the ON condition.
ANALOG INPUT

• An analog input is a continuous,variable


signal.Typical analog inputs may vary from 0 to 20
milliamps,4 to 20 milliamps,or 0 to 10 volts.In the
following example,a level transmitter monitors the
level of liquid in a tank.Depending on the
leveltransmitter,the signal to the PLC can either
increase or decrease as the level increases or
decreases.
Example of Analog Input
Temperature Sensors PLC
Input
Types of Output Loads

A.Resistance Loads C.Analogue


1.lamps 1.Valve positioner
2. heating elements 2.servo motor control
B.Solid State 3.variable speed AC and
1.solid state relay DC motor control
2.LED-light emitting diode D.Inductive loads
3.seven segment display 1.solenoids
4.computer 2.Clutches
5.NC (numerical control) 3.AC and DC motors
6.motor controller
Discrete Output (Digital Output)

• A discrete output is an output that is either in


an ON or OFF condition.Solenoids,contactor
coils,and lamps are examples of actuator
devices connected to discrete outputs.
• Discrete outputs may also be referred to as
digital outputs.In the following example,a
lamp can be turned on or off by the PLC
output it is connected to.
Example of Discrete or Digital Output

solenoids

Digital Relay or
Output contactor

light
ANALOG OUTPUT

• An analog output is a continuous,variable


signal.The output may be as simple as a 0-
10 VDC level that drives an analog
meter.Examples of analog meter outputs are
speed,weight,and temperature.The output
signal may also be used on more complex
applications such as a current-to-pneumatic
transducer that controls an air-operated
flow-control valve.
EXAMPLE OF ANALOG OUTPUT
LADDER DIAGRAMS

• Ladder diagrams are specialized schematics commonly used


to document industrial control logic systems. They are called
”ladder” diagrams because they resemble a ladder, with two
vertical rails (supply power) and as many ”rungs” (horizontal
lines) as there are control circuits to represent. If we wanted to
draw a simple ladder diagram showing a lamp that is
controlled by a hand switch, it would look like this:

L1
PILOT LAMP L2
SWITCHES

RELAY
Digital Logic Functions
• We can construct simply logic functions for
our hypothetical lamp circuit, using multiple
contacts, and document these circuits quite
easily and understandably with additional
rungs to our original ”ladder.” If we use
standard binary notation for the status of the
switches and lamp (0 for unactuated or de-
energized; 1 for actuated or energized), a
truth table can be made to show how the logic
works:
OR GATE Logic
AND gate logic
NOT gate Logic
NAND Gate Logic
NOR Gate Logic
EXCLUSIVE OR Logic Gate or
EXOR Gate
Basic PLC I/O Connections

Fig.01
• When the normally-closed ”Stop” pushbutton switch is
unactuated (not pressed), the PLC’s X2 input will be
energized, thus ”closing” the X2 ”contact” inside the
program. This allows the motor to be started when
input X1 is energized, and allows it to continue to run
when the”Start” pushbutton is no longer pressed.
• When the ”Stop” pushbutton is actuated, input X2 will
de-energize, thus ”opening” the X2 ”contact” inside the
PLC program and shutting off the motor. inability to
turn off the motor.In addition to input (X) and output (Y)
program elements, PLCs provide ”internal” coils and
contacts with no intrinsic connection to the outside world.
These are used much the same as”control relays” (CR1,
CR2, etc.) are used in standard relay circuits: to provide
logic signal inversion when necessary.
PLC Basic Commands

0000 Mnemonic Codes


10000
( ) Address Instruction Data
0001
0000 LD 0000
1000
end 0001 OR 1000
0002 AND- NOT 0001

0003 OUT 10000


0004 END
TIM 01 TIM 00 #0300

TIM 00 TIM 01 #0600

TIM 00 10000

10000 10001

10001 TIM 02 #0150

TIM 02 TIM 03 #0300

TIM 02 10002
TIM 03
10002 10002

END
Address Instruction Data Address Instruction Data

0000 LD NOT 01 0009 TIM 02


TIM
0001 TIM 00 #0150
#0300 0010 LD TIM 02
0002 LD TIM 00 0011 TIM 03
0003 TIM 01 #0300
#0600 0012 LD TIM 02
0004 LD NOT TIM 00 0013 AND NOT 03
TIM
0005 OUT 10000 0014 OUT 10002

0006 LD NOT 10000 0015 LD NOT 10002


0007 OUT 1001 0016 OUT 10003

0008 LD 1001 0017 END


Permissive and interlock circuits
• A practical application of switch and relay logic is in
control systems where several process conditions have
to be met before a piece of equipment is allowed to start.
• A good example this is burner control for large
combustion furnaces. In order for the burners in a large
furnaceto be started safely, the control system requests
”permission” from several process switches,including
high and low fuel pressure, air fan flow check, exhaust
stack damper position, access, door position etc.Each
process condition is called permissive,and each
permissive switch is wired in series so that any one of
them detects an unsafe conditions, the circuit will be
opened.
Permissive and interlock circuits
• If all permissive conditions are met, CR1 will energize
and the green lamp will be lit. Inreal life, more than just
a green lamp would be energized: usually a control
relay or fuel valve solenoid would be placed in that
rung of the circuit to be energized when all the
permissive contacts were ”good:” that is, all closed.
• If any one of the permissive conditions are not met,the
series string of switch contacts will be broken, CR2 will
de-energize, and the red lamp will light.
• Note that the high fuel pressure contact is normally-
closed. This is because we want theswitch contact to
open if the fuel pressure gets too high. Since the
”normal” condition of any pressure switch is when zero
(low) pressure is being applied to it, and we want this
switch to open with excessive (high) pressure, we
must choose a switch that is closed in its normal state.
Programming

• A program consists of one or more instructions that


accomplish a task.
• Programming a PLC is simply constructing a set of
instructions.
• There are several ways to look at a program such as
ladder logic,statement lists,or function block
diagrams.
Ladder Logic Diagram

• The left vertical line of a ladder logic diagram


represents thepower or energized conductor.
• The output element or instruction represents the
neutral or return path of the circuit.
• The right vertical line,which represents the return
path on a hard-wired control line diagram,is
omitted.Ladder logic diagrams are read from left-to-
right,top-to-bottom.Rungs are sometimes referred to
as networks.A network may have several control
elements,but only one output coil.
Ladder Logic Diagram
In the example program
shown example I0.0,I0.1 and
Q0.0 represent the first
instruction combination.
• If inputs I0.0 and I0.1 are
energized,output relay Q0.0
energizes.
• The inputs could be
switches,pushbuttons,or
contact closures.I0.4,I0.5,and
Q1.1 represent the second
instruction combination.
• If either input I0.4 or I0.5 are
energized,output relay Q0.1
energizes.
STL Statement List
• A statement list (STL)provides another view of a set
of instructions.
• The operation,what is to be done,is shown on the left.
• The operand,the item to be operated on by the
operation,is shown on the right.
• A comparison between the statement list shown
below,and the ladder logic shown on the previous
page,reveals a similar structure.The set of
instructions in this statement list perform the same
task as the ladder diagram.
Statement List …..
FBD-Function Block Diagram
• Function Block Diagrams
(FBD)provide another view of
a set off instructions.Each
function has a name to
designate its specific task.
• Functions are indicated by a
rectangle.Inputs are shown
on the left-hand side of the
rectangle and outputs are
shown on the right-hand side.
• The function block diagram
shown on the right performs
the same function as shown
by the ladder diagram and
statement list.
S1 S2 I 1.0 I 1.1 Q 4.0
Programmable ( )
Controller Q 4.0

Ladder Diagram

HARDWARE A I 1.0
A I 1.1
I 1.0 = Q 4.0
&
I 1.1 Q 4.0 STL-Statement List

Function Block Diagram


AND –BINARY LOGIC OPERATIONS
Q 8.0
I 0.0
S1 I O.0 I 0.1 Q 8.0 =
( ) &
S2 =
( ) I 0.1 Q 8.1
Q 8.1
L1 L2 Function block
Ladder diagram
diagram
circuit diagram
Statement list
A I 0.0
A I 0.1
= Q 8.0
= Q 8.1
OR –BINARY LOGIC OPERATIONS
Q 8.0
I 0.0
S1 S2 I 0.0 Q 8.0 =
( ) >=1

L1 I 0.1
I 0.1 Q
8
circuit diagram Ladder diagram Function block.
diagram 1

Statement list
O I 0.0
O I 0.1
= Q 8.0
XOR –BINARY LOGIC OPERATIONS
I 0.4 I 0.5 STL statement list
( ) Q 8.0 A I 0.4
X I 0.4
AN I 0.5
X I 0.5
AN I 0.4 Q
I 0.4 I 0.5 = Q 88.0
A I 0.5 .
1
I 0.4 Q 8.0 0 Q 8.0

& = I 0.4 Q 8.0

I 0.4 XOR =

& I 0.5

I 0.4
OR Operation

• In this example an OR
operation is used in
network 1.
• It can be seen that if either
input I0.2 (input 3)or (O in
the statement list) input
I0.3 (input 4),or both are
true,then output Q0.1
(output 2) will be true.
PLC Status
• When viewing the ladder diagram in the status
mode,controlelements that are active,or true (logic
1),are highlighted.In theexample shown the toggle
switch connected to input 1 has been closed.Power
can now flow through the control element associated
with input 1 (I0.0)and activate the output (Q0.0).The
lamp will illuminate.
PLC Forcing
• Forcing is another useful tool in the commissioning of an
application.It can be used to temporarily override the input
or output status of the application in order to test and
debug the program.
• The force function can also be used to override discrete
output points.
• The force function can be used to skipportions of a
program by enabling a jump instruction with a forced
memory bit.Under normal circumstances the toggle
switch,shown in the illustration below,would have to be
closed to enable input 1 (I 0.0) and turn on the output
light.Forcing enables input 1 even though the input toggle
switch is open.With input 1 forced high the output light will
illuminate.When a function is forced the control bit
identifier is highlighted.The element is also highlighted
because it is on.
Common Terms with I/O Cards

• I/O filtering ,delay,RC circuit-these are some of the


terms that describe the circuit attached to the input
and output circuits of a PLC card.
• Opto-isolator is used to protect the internal circuit of
the PLC from high voltages that may be accidentally
applied to an I/O circuit.
• An integrated circuit providing a non-contact
connection between the internal and external
voltagelevels is used.Inside this IC when an “on “
signal is transmitted,infrared light turns on the base of
a transistor inside the IC.This means that there is no
conductive path for the spikes to follow.
Opto-isolator
• Opto-isolator are normally rated at approximately 2.5
kv.This means that a path will not be created up to
this voltage.The IC will be useless before this voltage
is reached,but we can assured that the spike has not
reached inside the processor and damage the
system.
S1 R1
2.2k

U1
OPTOISO
+ R2
Vs1 560 D1 Internal
24 DIODE
- circuits

24 VDC input card


Types of output card

• 1.24 or 48VDC output card


• 2.110VAC
• 3.240 VAC
• 4.Analogue 0-10V DC or 4-20ma
• The function of MOV –metal oxide varistor is to clip
the high voltage that is fedback by an inductive load
when it is switched off. TRIAC

Opto-isolator MOV

Output card circuit


Transistor output card unit

Output card unit

+
Vs1
24
-

D2
DIODE RLY1
U1 24VCOIL
OPTOISO
Opto-isolator R2
560 Q1
NPN

D1
R1 DIODE
560
TYPICAL FIELD SIGNAL CONNECTIONS

AC LINE

TB
1
AUX

STOP 2

START 3

1LS 4

5
Typical Current Input Channel

1A

1B
R2
2A 220K

+
2B C1 U1
R1 1uF IDEAL
3A 10M
D1
R3
220K
A/D
BAV70

+
C2
1uF

+ V2 + V1
24 24
Analog to digital converter
4-20mA
transmitter
CB K

PUMP STOPPED
K 4

MOTOR START CR
TOL
37 38 3
1
OUTPUT
MODULE
K
K
PLC INPUT
2 MODULE
CR K
DRIVE 15 07 MCC
READY 8
13 CR 11 PLC OUTPUT MODULE
25 14 12 PLC COMMON
ACTIVE TERMINAL
27 07 5 6
9 K 10

You might also like