You are on page 1of 56

Chapter (4)

Programmable Logic Controllers


Chapter (4) Programmable Logic Controllers

 Course Syllabus
 Pneumatics actuators, gripper technology, control valves and pneumatic circuit
representation.
 Sequential control systems.
 Sensor technology for sequence control, optical, capacitive, inductive and magnetic.
o Programmable logic controllers (PLC). Sequential control system representation, logic
analysis and PLC programming. Relay logic ladder diagram, Timers, Counters, shift
registers.
o Computer simulation of a programmable pneumatic positioning system.

Chapter (1) Introduction to Mechatronic Automation.

Chapter (2) Pneumatic Systems

Chapter (3) Sensor Technology for Sequence Control

Chapter (4) Programmable logic controllers (PLC)

Chapter (5) PLC Programming

Chapter (6) PLC (Timers, Counters & Shift Registers )

Chapter (7) Computer simulation of a programmable pneumatic positioning system

Mechatronic Automation Dr. Ali M. Gaballa


2
Chapter (4) Programmable Logic Controllers The Need for PLCs

 Relay Controlled System

Mechatronic Automation Dr. Ali M. Gaballa


3
Chapter (4) Programmable Logic Controllers The Need for PLCs

 Relay Controlled System


o What is a relay system?
An electromagnetic device for remote or automatic control that is actuated by the
variation in condition of an electric circuit and that operates in turn other devices
(such as switches) in the same or different circuit.

Mechatronic Automation Dr. Ali M. Gaballa


4
Chapter (4) Programmable Logic Controllers The Need for PLCs

 Relay Controlled System

Electromagnetic Control Relays

Mechatronic Automation Dr. Ali M. Gaballa


5
Chapter (4) Programmable Logic Controllers The Need for PLCs

 Relay Controlled System


Relay operation

Mechatronic Automation Dr. Ali M. Gaballa


6
Chapter (4) Programmable Logic Controllers The Need for PLCs

 Relay Controlled System

o CR : control relays , NO : Normally open contacts , NC :Normally closed


contacts. , M : frequently indicates a motor starter
Relay normally open and normally closed contacts

Mechatronic Automation Dr. Ali M. Gaballa


7
Chapter (4) Programmable Logic Controllers The Need for PLCs

 Relay Controlled System

Control relay used to control two pilot lights


Mechatronic Automation Dr. Ali M. Gaballa
8
Chapter (4) Programmable Logic Controllers The Need for PLCs

 Relay Controlled System

The letter P symbolizes Pole, and the letter T symbolizes Throw.

Mechatronic Automation Dr. Ali M. Gaballa


9
Chapter (4) Programmable Logic Controllers The Need for PLCs

 Relay Controlled System


o Contactors : A contactor is a special type of relay designed to handle heavy power loads

Wiring symbol

Three-pole magnetic contactor

Mechatronic Automation Dr. Ali M. Gaballa


10
Chapter (4) Programmable Logic Controllers The Need for PLCs

 Relay Controlled System


o Motor Starters
A motor starter is designed to provide power to motors. The motor starter is made up of a
contactor with an overload relay attached physically and electrically to it

Three-phase magnetic motor starter.


Mechatronic Automation Dr. Ali M. Gaballa
11
Chapter (4) Programmable Logic Controllers The Need for PLCs

 Relay Controlled System


o The program takes the place of much of the external wiring that would be required
for control process

Disadvantages : Hardwire panels were very time consuming to wire, debug and change.
Mechatronic Automation Dr. Ali M. Gaballa
12
Chapter (4) Programmable Logic Controllers

 What is a Programmable Logic Controllers (PLC)


o A programmable logic controller (PLC) is a digital electronic device (or is a
specialized computer) used to control machine and process
o it uses a programmable memory to store instructions and specific functions such
as logic, sequencing, timing, counting and data handling.

Control Programming

Inputs from devices PLC Outputs to devices

o PLCs are similar to computers but have certain features which are specific to
their use as controllers. These are:
1. They are rugged and designed to withstand vibrations, temperature,
humidity and noise;
2. The interfacing for inputs and outputs is inside the controller;
3. They are easily programmed.

Mechatronic Automation Dr. Ali M. Gaballa


13
Chapter (4) Programmable Logic Controllers

 What is a Programmable Logic Controllers (PLC)

Mechatronic Automation Dr. Ali M. Gaballa


14
Chapter (4) Programmable Logic Controllers

 Define a programmable logic controller.


o A programmable logic controller (PLC) is a microprocessor based controller that uses
Programmable memory to store instructions and to implement functions such as logic,
sequencing, timing, Counting and arithmetic in order to control machines and process
 Basic PLC Structure

Mechatronic Automation Dr. Ali M. Gaballa


15
Chapter (4) Programmable Logic Controllers

Mechatronic Automation Dr. Ali M. Gaballa


16
Chapter (4) Programmable Logic Controllers

 Advantages of PLC Control System

Relay control panel PLC control panel

Mechatronic Automation Dr. Ali M. Gaballa


17
Chapter (4) Programmable Logic Controllers

 PLCs Versus Personal Computers

Mechatronic Automation Dr. Ali M. Gaballa


18
Chapter (4) Programmable Logic Controllers

 Applications of PLC
PLCs have now become a very convenient tool for flexible automation.
Applications of PLC include:
 Control of electrical motors in industrial drives.
 CNC machines.
 Robot control.
 Home and medical equipment.
 Operation of lifts in buildings.
 Control of traffic signals.
 Safety control of presses.

Mechatronic Automation Dr. Ali M. Gaballa


19
Chapter (4) Programmable Logic Controllers

 With the help of block diagram, explain the main components of a PLC.
A programmable logic controller (PLC) Program is a specially designed digital operating
microprocessor-based controller that uses a programmable memory for internal storage of
instructing and for internal storage of instructing and for implementing function such as
logic, sequencing, timing, counting and arithmetic in order to control machines and
processes.

Mechatronic Automation Dr. Ali M. Gaballa


20
Chapter (4) Programmable Logic Controllers

 Power Supply:
o The purpose of a power supply unit is to convert the main A.C voltage into a low level
D.C voltage (5V).
o The D.C. voltage is supplied to the processor and the circuits in the input and output
interface modules.
o The power supply should be free from heavy loads, noises and voltage fluctuations.

Mechatronic Automation Dr. Ali M. Gaballa


21
Chapter (4) Programmable Logic Controllers

 What are the main component parts of a PLC?


o Central processing unit (CPU)
o The input/output unit
o The programming device
o Memory unit.

 List various types of PLC programming devices.


o Use of hand held programmer
o Terminal with video display unit
o A personal computer with appropriate software.
o List down the types of buses required in a PLC.
o Data buses for communications data between elements.
o The address buses to read the address of locations for accessing stored data.
o Control buses for internal control actions.
Mechatronic Automation Dr. Ali M. Gaballa
22
Chapter (4) Programmable Logic Controllers

 Basic PLC Structure

It consist essentially of:


Central processing unit: control all
processes with frequency 1-8 M Hz
Memory: Buffers as temporary storage, ROM
for system data & RAM for user program
Input/output interface:
System buses

Mechatronic Automation Dr. Ali M. Gaballa


23
Chapter (4) Programmable Logic Controllers

 PLC System

Mechatronic Automation Dr. Ali M. Gaballa


24
Chapter (4) Programmable Logic Controllers

 Basic components of PLC:


The PLC hardware system consists of the basic components are
o Processor
o Memory
o Power Supply
o Input I Output modules
o Programming device
o Monitor

 Processor:
o It is the heart of PLC
o He processor processes the signals from input module and generates controlling signals
for the system
o It also scans and solve the logic of the user program
o It consists of ALU, microprocessor unit, memory unit and system power supply

Mechatronic Automation Dr. Ali M. Gaballa


25
Chapter (4) Programmable Logic Controllers

 Central Processing Unit:


o The CPU controls and processes all the operations within the PLC.
o It is supplied with a clock with a frequency of typically between 𝟏 𝒕𝒐 𝟖 𝑴𝑯𝒛.
o This frequency determines the operating speed of the PLC and provides the timing and
synchronization for all elements in the system.
o The information within the PLC is carried by means of digital signals.
o The processor is a microprocessor that executes a program to perform the operations
specified in a ladder diagram or a set of Boolean equations.

Mechatronic Automation Dr. Ali M. Gaballa


26
Chapter (4) Programmable Logic Controllers

 Control Unit:
o A control unit is used to control the timing of operations.
o The processor functions under a permanent supervisory operating system that directs the
overall operations from data input and output to execution of user programs.
o The controller can perform only one operation at a time. So, it scans each of the inputs
sequentially, evaluates the ladder diagram program, provide each output(s), and then
repeat the whole process.
o Hence, the timing control's necessary for a PLC system.

 Arithmetic and Logic Unit (ALU):


o This unit performs data manipulation and arithmetic and logical operations on input
variable data and determines the proper state of the output variables.
o The arithmetic operation includes addition, subtraction etc., and logic operations include
AND, OR, AND, EXCLUSIVE - OR.

Mechatronic Automation Dr. Ali M. Gaballa


27
Chapter (4) Programmable Logic Controllers

 Memory Unit:
o Memory termed registers located within the microprocessor and used to store
information involved in a program execution.
o These programs contain control actions to be executed by the microprocessor for the
given input. There are several memory elements in a PLC system.
o System Read-only Memory (ROM) gives permanent storage for the operating system
and fixed data wed by the CPU.
o RAM for the user to develop program and acts a temporary memory.
o In addition, temporary buffer stores for the I/O channels.

Mechatronic Automation Dr. Ali M. Gaballa


28
Chapter (4) Programmable Logic Controllers

 Memory:
o The memory unit contains the program stored in it
o The programs were written with control actions to be executed by the microprocessor for
the input given
o RAM is a temporary storage device used to store ladder diagram and for testing and
evaluation
o Then it is stored in ROM where changes cannot done

Mechatronic Automation Dr. Ali M. Gaballa


29
Chapter (4) Programmable Logic Controllers

 Memory Unit:
o The sequence of instructions to be executed, programs are stored in the memory unit.
o During entering and editing including Debugging, the program is stored in the temporary
storages called RAM (Random Access memory).
o Once the program is completely finished (free & from errors).
o It may be 'burned' into ROM
o When the ROM is plugged into the PLC, the device is ready to be placed into service in the
industrial environment.
o For network programmed PLCs, the final PLCs program is downloaded into a special
reprogrammable
o ROM (EPROM, PROM, and EEPROM) in the PLC.
o Memory may be either volatile type or Non-volatile type.

Mechatronic Automation Dr. Ali M. Gaballa


30
Chapter (4) Programmable Logic Controllers

 Volatile Memory:
o Volatile memory or temporary memory or Application memory is the user memory, where the
user can enter and edit the program.
o Volatile memory will lose all its programmed contents if operating power is removed or lost.
o here for necessary to provide a battery backup power to all times.

 Non Volatile Memory:


o Non-volatile memory or permanent memory or system memory is (used) a system memory that
stores the monitor a booting programs, lookup tables etc.,
o This usually programmed and supplied by the manufacturer.
o This controls the operation of PLC.
o It does not lose its content during power failure.
o It does not require any battery.
o The ROM memory offers the CPU to use only fixed amount of data.

 The Different Types of ROMS are


o Mask programmed ROM
o PROM
o EPROM
o EEPROM

Mechatronic Automation Dr. Ali M. Gaballa


31
Chapter (4) Programmable Logic Controllers

 Mask Programmed ROM:


o It is a special type of ROM which is programmed during manufacturing.
o The programmed content stored by this type of ROM memory cannot be altered.

 PROM:
o PROM stands for programmable Read only memory.
o It is a special type of ROM usually programmed by manufacturer during manufacturing.
o It has the disadvantage of requiring special programming device and once programmed Cannot be erased or
altered.

 EPROM:
o EPROM stands for electrically programmable Read only Memory.
o Here, the user programs electrically.
o One can erase the program completely by shining UV light source or quartz window in package.
o After the program chip is erased completely, program changes can be made.
o When the program developed in RAM, the manufacturers usually load it in EPROM to make permanent
storage.

 EEPROM:
o EEPROM - Electrically Erasable programmable Read-only memory.
o Even though, it is a non-volatile memory, it offers some programming flexibility as RAM.
o One can erase the program completely by electrical signals.
o Program changes can be made very easily with the use of a PC with EEPROM software.
o It can be electrically programmable by the user.

Mechatronic Automation Dr. Ali M. Gaballa


32
Chapter (4) Programmable Logic Controllers

 Buses:
• A set of parallel lines that provides communication between various devices of a system is termed
as a Bus.
• The bus system carries information and data’s to and from the CPU, Memory and I/O units.
• The information is transmitted in binary form as 0 or 1
• Digital signals or electrical signals are flowing inside the bus.
• It might be tracks on a printed circuit board (PCB) or wires in a ribbon cable.
• The PLC system contains four buses.
• They are namely Data Bus, Address Bus, Control bus and system bus.

Mechatronic Automation Dr. Ali M. Gaballa


33
Chapter (4) Programmable Logic Controllers

 Buses:
o I/O System Bus:
 The I/O system bus provide the communication between the I/O ports and I/O units
o Data Bus:
 The data bus contains 8, 16 or 32 parallel signal lines for sending data between the various
devices of a system.
 An 8-bit microprocessor has an internal data bus which can handle 8-bit numbers.
o Address Bus:
 The Address bus contains 16, 20, 24 or 32 parallel signal lines to carry the Address of the
memory locations for accessing stored data.
 Every memory location is given a distinct unique address to locate easily and accessed by the
CPU either to read or write data.
o Control Bus:
 The Control bus contains 4 to 10 parallel signal lines to carry the signals used by the CPU that
are related to internal Control actions. Typical control bus signals are Memory read Memory
write, I/O Read and I/O write.

Mechatronic Automation Dr. Ali M. Gaballa


34
Chapter (4) Programmable Logic Controllers

 Input / Output Modules:

Mechatronic Automation Dr. Ali M. Gaballa


35
Chapter (4) Programmable Logic Controllers

 Input / Output Modules:


o The Input module receives information from extended devices and sends to processor and
communicates the processed information to the external devices through output modules.
o The Input devices are mechanical switches, photo sensors, temperature sensors, flow
sensors, other type of sensors keypads etc.,
o The output devices may include solenoid valves, Relays, contactors, lights, Horns, Heating
elements, fans, Motor starter, signal Amplifiers, Conveyor belt, lift, automatic door etc.,
o I/O devices are also called peripheral devices.

Mechatronic Automation Dr. Ali M. Gaballa


36
Chapter (4) Programmable Logic Controllers

 Input / Output Modules:

Mechatronic Automation Dr. Ali M. Gaballa


37
Chapter (4) Programmable Logic Controllers

 Input / Output Modules:

Mechatronic Automation Dr. Ali M. Gaballa


38
Chapter (4) Programmable Logic Controllers

 Input / Output Modules:

Mechatronic Automation Dr. Ali M. Gaballa


39
Chapter (4) Programmable Logic Controllers

 Input / Output Modules:

Mechatronic Automation Dr. Ali M. Gaballa


40
Chapter (4) Programmable Logic Controllers

 Input / Output Modules:

Mechatronic Automation Dr. Ali M. Gaballa


41
Chapter (4) Programmable Logic Controllers

 Programming Device:
o It is used to enter the required program into the memory of the CPU
o The program is developed in programming device and stored into memory unit
o The two basic types of programming devices are:
 Mini-programmers
 Personal Computers

Mechatronic Automation Dr. Ali M. Gaballa


42
Chapter (4) Programmable Logic Controllers

 Input / Output Unit:


o The I/O units provide the interface between the system and the outside world, allowing for
connections to be made through I/O channels to input / output devices.
o Programs are entered from a program panel through I/O unit.
 Explain the input / output processing of plc.
o The sourcing and sinking are used to describe the way in which DC devices are connected to PLC
 Sourcing:
o If a switch is connected to the positive of the battery and current flows from positive to negative,
it is said to be the sourcing the current. So, the input device receives current from the input
module.
o For the PLC, input unit, hence input module is the source of the current. For the PLC output unit,
output module is the source of current as it supplies current to the output devices. Sourcing
output units for interfacing with solenoids.

Mechatronic Automation Dr. Ali M. Gaballa


43
Chapter (4) Programmable Logic Controllers

 Input / Output Unit:


o Here, the input device supplies current to the input module. For the PLC input unit, hence the input
module is the sink for the current. Sinking input units are used for interfacing with electronic
equipment.
o So, if a switch is connected to the negative of the battery and current flows from positive to
negative, by conventional current flow direction, it is said to be the sinking for Current. For the PLC
output unit, the current flows from output device to the output module then the output module is the
sink for current.

Mechatronic Automation Dr. Ali M. Gaballa


44
Chapter (4) Programmable Logic Controllers

 Input / Output Unit:

Mechatronic Automation Dr. Ali M. Gaballa


45
Chapter (4) Programmable Logic Controllers

 Steps involved in input / output processing:


The sequence followed by a PLC when carrying out a program can be as follows:
o Scan the inputs associated with one rung of the ladder program
o Solve the logic operation involving those inputs.
o Set / Reset the outputs for that rung
o Move on the next rung and repeat the operations 1, 2, 3

Mechatronic Automation Dr. Ali M. Gaballa


46
Chapter (4) Programmable Logic Controllers

 The two methods of Input/ Output processing operations are


o Continuous updating
o Mass Input / Output copying

 Continuous Updating:
The sequence followed thus in continuous updating is as follows:
o Fetch and decode the first program instruction
o Scan there relevant inputs
o Fetch and decode the second program instruction
o Scan the relevant inputs etc. For the remaining program instructions
o Update outputs
o Report the entire sequence.

 Mass Input / Output Copying:


The sequence followed in Mass I/O copying is thus:
o Scan all the inputs and copy into RAM
o Fetch and decode and execute all the program instructions in sequence
o Copy all the output instructions to RAM
o Update all outputs.
o Repeat the sequence

Mechatronic Automation Dr. Ali M. Gaballa


47
Chapter (4) Programmable Logic Controllers

 PLC In control circuits architecture

Mechatronic Automation Dr. Ali M. Gaballa


48
Chapter (4) Programmable Logic Controllers

 PLC size classification


o Number of inputs and outputs.
o Cost.
o Physical size

Mechatronic Automation Dr. Ali M. Gaballa


49
Chapter (4) Programmable Logic Controllers

 Advantages of PLC Control System

Mechatronic Automation Dr. Ali M. Gaballa


50
Chapter (4) Programmable Logic Controllers

 Advantages of PLC Control System

Mechatronic Automation Dr. Ali M. Gaballa


51
Chapter (4) Programmable Logic Controllers

 Advantages of PLC Control System

Mechatronic Automation Dr. Ali M. Gaballa


52
Chapter (4) Programmable Logic Controllers

 Advantages of PLC Control System

Mechatronic Automation Dr. Ali M. Gaballa


53
Chapter (4) Programmable Logic Controllers

 Advantages of PLC Control System

PLC Communications Module

Mechatronic Automation Dr. Ali M. Gaballa


54
Chapter (4) Programmable Logic Controllers

 Advantages of PLC Control System

Mechatronic Automation Dr. Ali M. Gaballa


55
Chapter (4) Programmable Logic Controllers

 Advantages of PLC Control System

Monitor

Mechatronic Automation Dr. Ali M. Gaballa


56

You might also like