CH 3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 81

Department of Electro Mechanical Engineering

Chapter – 3

Introduction to PLC
What is PLC?
What is Programmable Logic Controller (PLC) ?

Definition: National Electrical Manufacturers Association US (NEMA)

A PLC is a digital operating electronic apparatus which uses a


programmable memory for internal storage of instruction for
implementing specific function such as logic, sequencing,
timing, counting and arithmetic to control through analog or
digital input/output modules various types of machines or
process.
Contnd…
 A programmable logic controller (PLC) is a special form
of microprocessor-based controller that uses a
programmable memory to store instructions and to
implement functions such as logic, sequencing, timing,
counting and arithmetic in order to control machines and
processes.

PLC System
Programmable Logic Devices (PLD)
Programmable Logic Devices (PLD) - to perform different
control functions, according to the programs written in its
memory, using low level languages of commands.
 Programmable Logic Controller (PLC) – to control the
operation of electro-mechanical devices
 Microprocessor, a digital integrated circuit– digital
functions necessary to process information
 Microcomputer– uses microprocessor as its central
processing unit and contains all functions of a computer
Define PLC terminologies:
Several different terms used to described programmable
controllers:
i. PLC –Programmable Logic Controller (UK origin)
ii. PC – Programmable controller (US origin)

Most referring to the functional operation of the machine.

PLC has been used in this text to avoid confusion with the
personal computer.
Contnd…
What is a Microprocessor (MP)?
The word Microprocessor is a combination of two words micro and
processor.
Micro means small
Processor means a device which processes binary numbers
(0’s and 1’s).
Before the birth of microchip, processors were large
discrete elements
After invention of microchip, the size of the processor
became much smaller
A microprocessor is a multi-purpose, programmable, integrated
logic device that reads binary instructions from a storage device
(memory). It accepts binary data as input and processes the data
according to those instructions and provides result as an output.
Contnd…
Differences between microcomputer, microprocessor and
microcontroller
Microcomputer– a computer with a microprocessor as its CPU.
Includes memory, I/O

Microprocessor– silicon chip which includes ALU, register circuits


and control circuits

Microcontroller– silicon chip which includes microprocessor,


memory and I/O in a single package.
Explain PLC background
PLC Development factors:
i. needs for low-cost
ii. Flexible
iii. Easily commissioned/ smart usage
Historical Background:
In 1968, a group of engineers from General Motors developed
the concept of PLC with an initial specification.

The PLC must be:


i. Easy to program.
ii. Not need rewiring the control system if change the program.
iii. Smaller in size, cheaper and high reliability.
iv. Simple construction and low maintenance
v. Cost- competitive
PLC functions

CONTROL TYPE: FUNCTIONS

i. Conventional Relay Control Logic replacer


Sequence Control ii. Timers/ Counter
iii. PCB Card controller replacer
iv. Auto/Semi-auto/Manual control of machine
and process.

i. Arithmetic operation (+, -, × , ÷)


Advanced/ ii. Information Handling
Sophisticated Control iii. Analog Control (Temperature, Pressure )
iv. P.I.D (Proportional Integral Derivation)
v. Servo Motor Control
vi. Stepper Motor control
PLC functions:

CONTROL TYPE: FUNCTIONS

i. Process monitoring and alarm.


Supervisory Control ii. Fault Diagnostic and monitoring
iii. Interfacing with Computer (RS-232C/RS 422)
iv. Printer/ ASCII Interfacing
v. Factory Automation Networking
vi. Local Area Network (LAN)
vii. Wide Area Network (WAN)
viii.Factory Automation (F.A), Flexible
Manufacturing System (F.M.S) & Computer
Integrated Manufacturing (C.I.M).
PLC Size:
 Small :
- it covers units with up to 128 I/O’s and memories up to 2 Kbytes.
- Capable of providing simple to advance levels or machine controls.

 Medium :
- Have up to 2048 I/O’s and memories up to 32 Kbytes.

 Large :
- The most sophisticated units of the PLC family. They have up to
8192 I/O and memories up to 750 Kbytes.
- Can control individual production processes or entire plant.
Types of PLC Construction:

i. Compact PLC
ii. Modular PLC
iii. PLC Plug-in Card

Manufacturer: Siemens, Toshiba, Festo etc.


2.1.4 Types of PLC Construction:

i. Compact PLC:

Compact PLC – MELSEC FX3U

Figure 1: Compact PLC


ii. Modular PLC

Figure 2: Modular PLC


iii. PLC Plug-in Card

Figure 3: Plug-in Card PLC


ADVANTAGES OF USING PLC:
 Shorter project implementation time.
 Easier modification
 Project cost can be accurately calculated.
 Shorter training time required.
 Design easily changed using software ( changes and
addition to specifications can be processed by software.)
 A wide range of control application
 Easy maintenance.
 High Reliability
 Standardization of Controller hardware.
 Able to withstand Harsh plant/process environments
(Operate normally under severe conditions of temperature, humidity,
voltage fluctuations and noises).
Major Components of a Common PLC

POWER
SUPPLY

I M O M
N O U O
P D
T D
U U PROCESSOR
T L P U
E U L
From T E To
SENSORS OUTPUT
Pushbuttons, Solenoids,
contacts, contactors,
limit switches, alarms
etc. etc.
PROGRAMMING
DEVICE
Major Components of a Common PLC
POWER SUPPLY
Provides the voltage needed to run the primary PLC components
I/O MODULES
Provides signal conversion and isolation between the internal
signals inside the PLC and the field’s high level signal.
PROCESSOR
Provides intelligence to command and govern the activities of the
entire PLC systems.
PROGRAMMING DEVICE
used to enter the desired program that will determine the sequence
of operation and control of process equipment or driven machine.
Programming Device
Also known as:
 Industrial Terminal ( Allen Bradley )

 Program Development Terminal ( General Electric )

 Programming Panel ( Gould Modicon )

 Programmer ( Square D )

 Program Loader ( Idec-Izumi )

 Programming Console ( Keyence / Omron )

Types:
 Hand held unit with LED / LCD display

 Desktop type with a CRT display

 Compatible computer terminal


I/O Module
• The I/O interface section of a PLC connects it to external field
devices.
• The main purpose of the I/O interface is to condition the various
signals received from or sent to the external input and output
devices.
• Input modules converts signals from discrete or analog input
devices to logic levels acceptable to PLC’s processor.
• Output modules converts signal from the processor to levels
capable of driving the connected discrete or analog output devices.
Input –output devices
Input devices are connected to the terminal strip under the bottom
cover of the PLC.
Electrical contacts, pushbuttons and switches as input devices
Contnd…
Output devices, such relays and light, are connected to the
terminal strip under the top cover of the PLC.
Actuators, relays, indicator lamps, solenoids etc are out put
devices
Contnd…
Contnd…
Electrical Contacts
Electrical contacts are of three types
 Normally open(NO),
 Normally closed(NC), and
 Changeover (CO)
Contnd…
Actuators and Switches
 The device, which changes the state of a contact is called an
actuator
 The combination of an actuator and one or more contacts is
called a switch
 Push button switch
 A key selector
 Foot switches
 Roller lever switches and plunger operated switches : limit
switches
Contact symbol
Contnd…
Bit Logic
Bit Logic
POSITIVE & NEGATIVE Transition
The Positive Transition (EU) contact allows power to flow for
one scan for each off-to-on transition.
The Negative Transition (ED) contact allows power to flow for
one scan for each on-to-off transition.
Contnd…
Bit Logic
SET & RESET
The Set (S) and Reset (R) instructions
Set (turn on) or Reset (turn off) the specified number
of points (N), starting at the specified address (Bit).
You can set or reset from 1 to 255 points.

If the Reset instruction specifies either a timer bit (T) or counter


bit (C), the instruction resets the timer or counter bit and clears
the current value of the timer or counter.
Timers
Timers are devices that count increments of time. They are used
with traffic lights, for example, to control the length of time
between signal changes.
Contnd…
Timers
S7-200 Timers
Timer are represented by boxes in ladder logic. When a timer receives an enable
signal, it starts timing and continuously compares its current time with a preset
time (PT). The time output logic 0 as long as the current time is less than the
preset time. When the current time exceed the preset time, the out put changes to
logic 1.
The Siemens S7-200 PLC uses three types of timers
1. On-Delay (TON)
2. Retentive On-Delay (TONR)
3. Off-Delay (TOF)
Contnd…
Timers
On-delay (TON)
When an On-delay (TON) timer receive a logic 1, or enable, at its
input (IN) a preset amount of time (PT) passes before the timer bit
turn on. The timer resets to the starting time when the enabling input,
IN, goes to a logic 0.
Contnd…
Timers
Off-delay (TON)
The Off-delay is used to delay an output turning off for a fixed
period of time after the input turns off. When the enabling input
turns on, the timer bit turns on immediately. The timing value is set
to 0. when the input turns off, the timer counts until the preset time
has elapsed, then the timer bit turns off.
Contnd…
Timers
Retentive On-delay (TONR)
The timer functions similarly to the On-Delay Timer, with one
difference. The Retentive On-Delay timer times as long as the
enabling input is on, but does not reset when the input goes off. The
timer must be reset with a RESET (R) instruction.
Counters
Counters
Counters used in PLCs serve factions similar to mechanical
counters. They compare accumulated values with preset values in
order to control circuit functions. Control applications that use
counters commonly include the following functions.
Count to preset value and cause an event to occur.
Cause an event to occur until the count reaches a preset value

A bottle machine, for


example, may use a
counter to count bottles
into groups of six for
packaging.
Contnd…
Counters
Contnd…
Counters
Contnd…
Counters
Contnd…
Counters
Fundamentals of Logic
Fundamentals of Logic
Exercises
Ladder Logic
Ladder logic is the main programming method used for PLCs
Logic solution Ladder diagram implementation
Programming Format
1) Ladder diagram
2) Mnemonic List
3) Function Block Diagram
Contd…
NOR, NAND, EX-OR
Contd…
OR OPERATION
In the rung above, it can be seen that
either input A or B is be true (1), or Rung
both are true, then the output C is true
(1).
AND OPERATION
Each rung or network on a ladder
program represents a logic operation. Rung
In the rung above, both inputs A and B
must be true (1) in order for the output C
to be true (1).
NOT OPERATION
In the rung above, it can be seen that if Rung
input A is be true (1), then the output C is
true (0) or when A is (0), output C is 1.
Contd…
Timer: On delay and Off delay
Contd…
LADDER DIAGRAM
A ladder diagram (also called contact symbol) is a means of
graphically representing the logic required in a relay logic
system.
Contd…
Ladder Representation
Contd…
Contd…
Contd…
Contd…
Contd…
Contd…
Problem: Develop a relay based controller that will allow three
switches in a room to control a single light.

Solution: There are two possible approaches to this problem. The


first assumes that any one of the switches on will turn on
the light, but all three switches must be off for the light to
be off.
Contd…
Problem: Develop a program that will cause output D to go true when switch A
& switch B are closed or when switch C is closed.

Solution

Problem: Develop a program that will cause output D to be on when push


button A is on, or either B or C are on.

Solution:
Contd…
Problem: Develop Ladder Logic for a car door/seat belt safety system. When
the car door is open, and the seatbelt is not done up, the ignition
power must not be applied. If all is safe then the key will start the
engine.

Solution:
Contd…
Problem: Develop Ladder Logic for a car door/seat belt safety system. When
the car door is open, and the seatbelt is not done up, the ignition
power must not be applied. If all is safe then the key will start the
engine.

Solution:
Contd…
Problem: Design a motor controller that has a forward and a reverse button. The
motor forward and reverse outputs will only be on when one of the
buttons is pushed. When both buttons are pushed the motor will not
work.

Solution:
Contd…
Problem: Draw a ladder diagram that will cause output D to be on when push
button A is on, or either B or C are on.

Solution:
Contd…
Problem: Develop the ladder logic that will turn on an output light, 15 seconds
after switch A has been turned on.
Contd…
Problem: Develop the ladder logic that will turn on a light, after switch A has
been closed 10 times. Push button B will reset the counters.
Ladder Logic
Ladder logic is the main programming method used for PLCs
Logic solution Ladder diagram implementation
Contd…
Example: A Burglar Alarm
Consider the design of a burglar alarm for a house.
When activated an alarm & lights will be activated to
encourage the unwanted guest to leave.
This alarm be activated if an unauthorized intruder is detected
by window sensor and a motion detector.
The window sensor is effectively a loop of wire that is a piece
of thin metal foil that encircles the window. If the window is
broken, the foil breaks breaking the conductor. This behaves
like a normally closed switch. The motion sensor is designed
so that when a person is detected the output will go on. As
with any alarm an activate/deactivate switch is also needed.
Contd…
Solution

The next step is to define the controller equation. In this case the controller has
3 different inputs, and a single output, so a truth table is a reasonable approach
to formalizing the system.`
Contd…
Then a Boolean equation can be written
based on the truth table obtained

Ladder diagram
Examples
1. Devise a relay based controller that will allow three switches in
a machine to control a single motor
Solution
There are two possible The second solution assumes
approaches to this problem. that each switch can turn the
The first assumes that any one motor on or off, regardless of the
of the switches on will turn on states of the other switches. You
the light, but all three switches might recognize this problem as
must be off for the motor to be an Exclusive OR problem.
off.

75
Examples
2. Convert the digital circuit shown below into an equivalent
ladder logic circuit.
(a) (b)

Solutions
(a) (b) ????

76
3.Write the Boolean equation and a statement list for the ladder logic
circuit shown in the figure below
(a) (b)

3a.
3b. ???????????

77
4. Convert the digital circuit shown below into an equivalent ladder
logic
(a) (b)

Solution
(a) (b) ?????

78
5. In the manual operation of press, a 2 button safety interlock is
used. Both buttons must be used to start the cycle. One on one
side, the other on the other side. Operator inserts the part and
presses the button.
a) Write truth table d) Boolean expression
e) Logic plan and
b) Statement list f) Ladder logic plan.
c) Functional block diagram
Solution

79
6.Write the Boolean equation and logic diagram for the ladder logic
circuit shown in the figure below
(a) (b)

Solution

(a) (b) ?????

80
END

You might also like