You are on page 1of 24

Introduction to Programmable Logic Controllers (PLC's)

• A programmable logic controller (PLC)is a specialized computer used to control


machines and process.

• It uses a programmable memory to store instructions and specific functions that


include On/Off control, timing, counting, sequencing, arithmetic, and data handling.

Control program

Inputs from devices Outputs to devices


PLC

Programmable logic control

Advantages of PLC Control Systems

• Flexible.

• Faster response time.

• Less and simpler wiring.

• Solid-state - no moving parts.

• Modular design - easy to repair and expand.

• Handles much more complicated systems.

• Sophisticated instruction sets available.

• Allows for diagnostics “easy to troubleshoot”.

• Less expensive.

Advantages of a PLC Control System

• Eliminates much of the hard wiring that was associated with conventional relay
control circuits:-The program takes the place of much of the external wiring that
would be required for control of a process.
• Increased Reliability: Once a program has been written and tested it can be
downloaded to other PLC’s.

• More Flexibility: Original equipment manufacturers (OEMs) can provide system


updates for a process by simply sending out a new program. i.e., It is easier to create
and change a program in a PLC than to wire and rewire a circuit. End-users can
modify the program in the field.

• Lower Costs: Originally PLC’s were designed to replace relay control logic. The cost
savings using PLC’s have been so significant that relay control is becoming obsolete,
except for power applications.

• Communications Capability: A PLC can communicate with other controllers or


computer equipment. They can be networked to perform such functions as:
supervisory control, data gathering, monitoring devices and process parameters, and
downloading and uploading of programs.

• Faster Response Time: PLC’s operate in real-time which means that an event taking
place in the field will result in an operation or output taking place.

• Easier To Troubleshoot: PLC’s have resident diagnostic and override functions


allowing users to easily trace and correct software and hardware problems. The
control program can be watched in real-time as it executes to find and fix problems.

PLC System
BLOCK DIAGRAM OF A PLC

Power supply

• The electrical supply that converts alternating current (AC) line voltage to various
operational DC values. In the process, the power supply filters and regulates the DC
voltages to ensure proper computer operation.

Processor (CPU)
Programmer / Monitor

• The programmer / monitor (PM) is a device used to communicate with the circuits of
the PLC. Hand-held terminals, industrial terminals, and the personal computer exists
as PM devices.

• In a hand -held unit, input takes place through a membrane keypad and the display is
usually a liquid-crystal display (LCD).

• With the industrial terminal or personal computer, more complex, typewriter-type


keyboard and cathode ray tubes (CRTs) are employed.

Programmer / Monitor
Input / Output module

• The input module has terminals into which outside process electrical signals,
generated by sensors or transducers, are entered.

• The output module has terminals to which output signals are sent to activate relays,
solenoids, various solid-state switching devices, actuators, motors, and displays.

I/O Section

Input module
Output Module

Racks and Chassis

• The racks on which the PLC parts are mounted and the enclosures on which the CPU,
PM and I/O modules are mounted.

PLC Operation

• In the PLC, the program steps defined by the ladder diagram are executed
simultaneously and continuously. First the inputs to the PLC are sampled by the
processor and the contents are stored in the memory.

• Next, the control program is executed.

• The input values stored in memory are used in the control logic calculations to
determine the value of the output.

• Finally the outputs are updated to agree with the calculated values. This cycle
consisting of reading inputs, executing the control program and revising the outputs is
referred to as a ‘scan’.

• The time to perform a scan is called the scan time and this depends on the number
and complexity of control function to be performed in each cycle.

PLC PROGRAMMING

• PLC is programmed by means of a programming device.

• The programming device is usually detachable from the PLC and it can be shared
between the different controllers.
• Most of the programming methods used today for PLCs are based on the ladder logic
diagrams.

• Ladder diagram consists of two vertical lines representing the power rails.

• Circuits are connected as horizontal lines, i.e. the rungs of the ladder, between these
two verticals.

LADDER DIAGRAM AND


SYMBOLS
Input 1 Output A
Output A occurs when
input 1 occurs Input as contacts not
Input 1 Input 3 Output B closed until input
Output B occurs when
input 1 and input 3 Input as contacts which
Input 4 Output C occurs are closed until input
Output C occurs when
input 4 or input 5 Output
Input 5 occurs
Special instruction

LADDER DIAGRAM LADDER SYMBOLS

Ladder diagram

• PLC programming based on the use of ladder diagrams involves writing a program in
a similar manner to drawing a switching circuit.

• The ladder diagram consists of two vertical lines representing the power rails.

• Circuits are connected as horizontal lines, i.e. the rungs of the ladder, between these
two verticals

• Figure shows the basic standard symbols that are used and an example of rungs in a
ladder diagram.

• In drawing the circuit line for a rung, inputs must always precede outputs and there
must be at least one output on each line. Each rung must start with an input or a series
of inputs and end with an output.
PLC ladder diagrams
(i) Closer of A and B would give output C . i.e., C = A . B
(ii) Closer of either A or B would give output C . i.e., C = A + B
(iii) C = NOT ‘A ‘ . Output is NOT equal to input or is always opposite to it.
If input is 1 , output is 0 and vice-versa.
(iv) NAND - NOT AND & NOR – NOT OR is also shown.

A PLC controlling hydraulic circuit


• relay ladder diagram

Hydraulic cylinder using a single limit switch. relay ladder diagram


I/O connection diagram
Power line
Power line

Stop
(NC) Sol A
010
001
Start
(NO)

002
LS-1
(NC)
003

Output module
Input module

PLC ladder logic diagram


• The two rungs of the relay ladder diagram are converted to two rungs of the
PLC ladder logic diagram.
• The terminal numbers used on the I/O connection diagram are the same
numbers used to identify the electrical devices on the PLC ladder logic
diagram.

001 002 003 030


B
A E
A D

030

030 010 F G

Entering program into PLC

• The programmer can enter the program into PLC using the keyboard with graphic
symbols for the ladder elements, or using a computer screen and a mouse to select the
symbols, and the program panel or computer then translates these symbols into a
machine language that can be stored in the PLC memory.

• There is an alternated way of entering a program and that is to translate the ladder
program into mnemonics, each code corresponds to a ladder elements and then enter
these into the programming panels or computer. These are then translate into machine
language.

• Mnemonics used by different PLC manufacturers are different.

Programming using Mnemonics

Example of Mnemonics

Example of Mnemonics
Application example
TIMERS
• A motor or pump need to be controlled to operate for a particular interval of time or to be
switched on after some time interval.
• PLC thus have timers as built in devices.
• Timers count seconds using the internal CPU clock.
• A common approach is to consider timer to behave like relays with coils that when energized,
results in the closure or opening of contacts after some pre-set time.
• The timer is thus treated as an output for a rung , with control being exercised over pairs of
contact elsewhere as shown in Figure (a).
• Some treat timer as a delay block that when inserted in a rung, delays signals in that rung
from reaching the output as shown in Figure (b).
Counting circuit

Internal relay

• In PLCs there are elements that are used to hold data, that is, bits, and behave like
ralays, being able to be switched on or off and to switch other devices on or off.

• For programming they can be treated in the same way as an external relay and input.

Ladder program for internal relay


Shift register

• A register is a number of internal relays grouped together, normally 8,16.32.

• Each internal relay is effectively closed or opened, these states being designated 0 and
1.

• So, if we have 8 internal relays in the register, we can store eight 0/1 state.Thus we
might have, for internal relays:
Master and Jump controls
Master control relay representation
Jumps

Microcontroller and its applications

• A microcontroller (sometimes abbreviated µC, uC or MCU) is a small computer on a


single integrated circuit containing a processor core, memory, and programmable
input/output peripherals.

• Microcontrollers are designed for embedded applications, in contrast to


the microprocessors used in personal computers or other general purpose applications.

• The microcontroller is a specialized microprocessor that contains much of the


circuitry and devices needed internally to collect data from inputs. It holds
permanent programs in a type of ROM. It has temporary storage space for data in
RAM and can control simple devices throug outputs. In our example of the
microwave oven, a microcontroller has all of the essential blocks to read from a
keypad, write information to the display, control the heating element and store data
such as cooking time.
• In addition to simple ON/OFF inputs and outputs, many microcontrollers have
abilities such as counting input pulses, measuring analog signals, performing pulse-
width modulated output, and many more.

• Microcontrollers are used in automatically controlled products and devices, such as


automobile engine control systems, implantable medical devices, remote controls,
office machines, appliances, power tools, and toys.

• By reducing the size and cost compared to a design that uses a separate
microprocessor, memory, and input/output devices, microcontrollers make it
economical to digitally control even more devices and processes.

• Mixed signal microcontrollers are common, integrating analog components needed to


control non-digital electronic systems.

Fault detection techniques


Possible design solutions
TIMED SWITCH

PLC FOR TIMED SWITCH

You might also like