Mechatronics CHAPTER 5
Mechatronics CHAPTER 5
CHAPTER FIVE
Programmable
Logic
Controller
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
Introduction: PLC
The First Programmable Logic Controllers (PLCs)
• Introduced in the late 1960’s
• Developed to offer the same functionality as the existing relay logic
systems
• Programmable, reusable and reliable:
– Could withstand a harsh industrial environment
– They had no hard drive, they had battery backup
– Used Ladder Logic for programming
Introduction: PLC
Also known as programmable controller (PC) defined by the National
Electrical Manufacturers Association (NEMA) in 1978 as: a digitally
operating electronic apparatus which uses a programmable memory for the
internal storage of instructions for implementing specific functions such as :-
✓ logic,
✓ Sequencing
✓ timing
✓ counting and arithmetic
Introduction: PLC
Overview of PLC
• low cost, compact, standard microprocessor architecture used in the
control of machines or processes
• designed for ease of programming and maintenance
• replace the old relay logic control systems in automated manufacturing
provide an easy and efficient replacements for the bulky relay logic
controllers
Introduction: PLC
The Need for PLCs
• Hardwired panels were very time consuming to wire, debug and change.
• The following requirements for computer controllers to replace hardwired
panels.
– Solid-state not mechanical
– Easy to modify input and output devices
– Easily programmed and maintained by plant electricians
– Be able to function in an industrial environment
Introduction: PLC
Advantages of PLC Control Systems
• Flexible
• Similar to a Microcontroller:
• Microprocessor Based
• Onboard Memory for Storing Programs
• Special Programming Language:
- Ladder Logic
• Input/Output Ports
Introduction: PLC
Typical applications of PLC
➢Embedded control in standard or custom-designed machines
➢Control of conveyor systems
➢Networked to manage large complex distributed control systems
➢Security alarm monitoring system
➢Elevator control
➢Air-conditioning control panel
➢Water treatment plant
➢Underground coal-mining machines.
Introduction: PLC
A PLC consists of two basic sections:
✓the central processing unit (CPU), and
✓the input/output interface system.
The CPU, which controls all PLC activity, can further be broken down into: the
processor, and memory system.
14
Introduction: PLC
15
Introduction: PLC
16
Introduction: PLC
PLC Size
1. SMALL - It has up to128 I/O’s and memories up to 2 Kbytes. - These
PLC’s are capable of providing simple to advance levels or machine
controls.
2. MEDIUM- Have up to 2048 I/O’s and memories up to 32 Kbytes.
3. LARGE - The most sophisticated units of the PLC family. They have up to
8192 I/O’s and memories up to 750 Kbytes.
Can control individual production processes or entire plant.
17
Introduction: PLC
The overall plc bus
18
Introduction: PLC
Power Supply
PLCs are usually powered directly from 120 or 240 V. The power supply
converts the AC into DC voltages for the internal microprocessor components.
It may also provide the user with a source of reduced voltage to drive switches,
small relays, indicator lamps, and the like.
Processor
The processor is a microprocessor-based CPU and is the part of the PLC that is
capable of reading and executing the program instructions, one-by-one (such
as the rungs of a ladder logic program). 19
Introduction: PLC
❖Program Memory
The program memory receives and holds the downloaded program instructions
from the programming device. If this memory is standard RAM, the program
will be lost every time the power is turned off, requiring it to be reloaded.
To avoid this bother, the program memory may use an EEPROM (electrically
erasable programmable ROM) or a battery-backup RAM, both of which are
capable of retaining data even when the power is off.
20
Introduction: PLC
Data Memory
Data memory is RAM memory, Temporarily store internal and external
generated data.
For example, it would store the present status of all switches connected to the
input terminals and the value of internal counters and timers.
Programming Port
The programming port ,an input/output (I/O) port, receives the downloaded
program from the programming device (usually a PC).
21
Introduction: PLC
Input and Output Modules
The I/O modules are interfaces to the outside world. These control ports may be
built into the PLC unit or, more typically, are packaged as separate plug-in
modules, where each module contains a set of ports.
Switch
A mechanical device that can allowing a current to flow or not. There are two
fundamental uses for switch.
22
Introduction: PLC
Different types of switch
➢Pushbutton
There are two types of pushbutton, the momentary and maintained
The momentary pushbutton switch is activated when the button is pressed, and
deactivated when the button is released. The deactivation is done using an
internal spring.
The maintained pushbutton activates when pressed, but remains activated when
it is released. Then to deactivate it, it must be pressed a second time. on/off
switches on most desktop computers. 23
Introduction: PLC
Limit Switch
Limit switches are usually not operator accessible. Activated by physical contact
with some movable object. An example is a car door switch, which senses
whether or not the door is closed. they are activated by moving parts on the
machine.
Magnetic switches used on home security systems that sense when a window has
been opened .
Mechanically operated limit switch is the switch on the refrigerator door that
turns on the light inside.
Introduction: PLC
Limit Switch
Limit switches are usually not operator accessible. Activated by physical contact
with some movable object. An example is a car door switch, which senses
whether or not the door is closed. they are activated by moving parts on the
machine.
Magnetic switches used on home security systems that sense when a window has
been opened .
Mechanically operated limit switch is the switch on the refrigerator door that
turns on the light inside.
Introduction: PLC
Introduction: PLC
Indicator Lamps
Control panels include indicator lamps.
They tell the operator when power is applied to the machine and indicate the
present operating status of the machine.
The colors are usually red, green, and amber, but other colors are also available.
Introduction: PLC
Light color and their indication
Red lamps are reserved for safety critical indicators (power is on, the machine
is running, an access panel is open, or fault has occurred).
Green lamps usually indicates safe conditions (power to the motor is off, brakes
are on, etc.).
Amber lamps indicates conditions that are important but not dangerous
(fluid getting low, machine paused, machine warming up, etc.).
Introduction: PLC
Light color and their indication
Red lamps are reserved for safety critical indicators (power is on, the machine
is running, an access panel is open, or fault has occurred).
Green lamps usually indicates safe conditions (power to the motor is off, brakes
are on, etc.).
Amber lamps indicates conditions that are important but not dangerous
(fluid getting low, machine paused, machine warming up, etc.).
Introduction: PLC
Relays
is a device that uses an electromagnet to provide the force to close or open
switch contacts, in other words, an electrically powered switch.
Relay contacts are described as being one of two kinds:
Normally open contacts (NO), which are open in the Unenergized state, and
Normally closed contacts (NC), which are closed in the unenergized state.
Introduction: PLC
Introduction: PLC
In General, Relays Transform a Control Signal into a Control Action.
Relays Provide:
Isolation Between Input and Output
Leverage (Small Signal Can Control Large Action)
Automation (Minimize Human Interaction with a Control Process)
Introduction: PLC
Basic Relay Symbols
Introduction: PLC
Introduction: PLC
Introduction: PLC
Introduction: Digital Logic
Digital systems are concerned with digital signals
Digital signals can take many forms
Here we will concentrate on binary signals since these are the most common
form of digital signals
can be used individually
perhaps to represent a single binary quantity or the state of a single
switch
can be used in combination
to represent more complex quantities
Introduction: Digital Logic
S L
0 0
1 1
A simple binary
arrangement A truth
table
Introduction: Digital Logic
L = S1 AND S2
Introduction: Digital Logic
L = S1 OR S2
Introduction: Digital Logic
L = S1 AND S2 AND S3
Introduction: Digital Logic
L = S1 OR S2 OR S3
Introduction: Digital Logic
Logic Gates
The building blocks used to create digital circuits are logic gates
There are three elementary logic gates and a range of other simple gates
Each gate has its own logic symbol which allows complex functions to
be represented by a logic diagram
The function of each gate can be represented by a truth table or using
Boolean function/notation
Introduction: Digital Logic
• The OR gate
Introduction: Digital Logic
A B C X
– first write down a Boolean
0 0 0 0
0 0 1 1
expression for the output
0 1 0 0
0 1 1 0
– then implement as before
1 0 0 0
1 0 1 1 – in this case
1 1 0 1
1 1 1 0
X = A BC + ABC + ABC
Introduction: Digital Logic
Thanks in advance!