You are on page 1of 5

International Islamic University, Islamabad

Faculty of Engineering and Technology


Department of Electrical and Computer
Engineering

Industrial Drives and PLC Lab

EXPERIMENT # 02: Introduction to Programmable Logic Controller

Name of Student: …………………………………..

Roll No.: ……………………………………………

Date of Experiment: ………………………………..


Objectives:
After performing this Lab you will be able to:

1. Understand function of Relays


2. Understand the background of PLCs
3. Differentiate PLC from Micro-controller
4. Understanding of Ladder Diagram

Relay Controllers:

A relay is an electrically operated switch. Current flowing through the coil of the relay
creates a magnetic field which attracts a lever and changes the switch contacts. The coil current
can be on or off so relays have two switch positions.

Figure 2.1: Relay Components

The relay's switch connections are usually labeled COM, NC and NO. COM (Common)
is reference point of the switch which is always connected. NC (Normally Closed) is the contact
where COM is connected when the relay coil is off. NO (Normally Open) is the contact where
COM is connected when the relay coil is on. So you should connect to COM and NO if you
want the switched circuit to be on when the relay coil is on and connect to COM and NC if you
want the switched circuit to be on when the relay coil is off.

Introduction to Ladder Diagram:

Ladder Diagram is also known as “Ladder Logic” is one of the simplest methods used
to program a PLC. It is a graphical programming language evolved from electrical relay
circuits. Each program statement is represented with a line, called the rung, that has all relevant
inputs to the left and the output to the right. The output device of a rung is energized if electric
power can conceptually flow from the left side of the rung to the right side. Input devices are
assumed to block the flow of power if they are not activated. During the execution of a ladder
diagram, the PLC reads the states of all inputs, then determines the states of a ladder diagram,
the PLC reads the states of all inputs, then determines the states of all outputs starting from the
rung at the top side, going down to the last rung, and finally updates the state of the output
devices.

Industrial Drives and PLC Lab Page 2


Figure 2.2: An example of typical Ladder Diagram

Introduction to PLC:

A Programmable Logic Controller (PLC) is a digital computer used for automation of


electromechanical processes, such as control of machinery on factory assembly lines, heating,
cooling or lighting fixtures. PLCs are used in many industries and machines. Unlike general-
purpose computers, the PLC is designed for multiple inputs and output arrangements, extended
temperature ranges, immunity to electrical noise, and resistance to vibration and impact.
Programs to control machine operation are typically stored in battery-backed or non-volatile
memory. A PLC is an example of a hard real time system since output results must be produced
in response to input conditions within a bounded time, otherwise unintended operation will
result.

Y0
X0
Programming Software Y1
X1
Y2
X2
.
.
.
.
Processor .
.
Y9
X13

Input Module Channel Output Module


Channel

Figure 2.3: Basic Structure of Programmable Logic Controller (PLC)

PLC processor executes a program to perform the operation specified in a ladder


diagram. The processor performs arithmetic and logic operations on input variable data and
determines the proper state of the output variables. Input module channel examine the state of
physical switches and other input devices and put their state into the form suitable for the
processor. The PLC is able to accommodate a number of inputs, called channels. The output

Industrial Drives and PLC Lab Page 3


modules supply ac power to external devices such as motors, lights, solenoids, and so on, just
as required in the ladder diagram.

PLC Operation can be considered in two modes, the I/O scan mode and the execution
mode. In I/O scan mode, the processor updated all outputs and inputs the state of all inputs one
channel at a time. In execution mode, the processor evaluates each rung of the ladder diagram
program that is being executed sequentially, starting from the first rung and proceeding to the
last rung.

Scan Time is an important characteristic of PLC which is how much time is required
for one complete cycle of I/O scan and execution. This depends upon number of I/O channels
involved, length of the ladder diagram program and the processing speed. A typical maximum
scan and execution time is 5 to 20 ms.

Advantages of PLCs over Conventional Relays, Counters and Timers

PLC has many advantages over conventional relays, counter and timers stated below:

1. The input and output variables of discrete-state control systems are binary in
nature, just as with a computer. Thereby provide fast execution.
2. Many of the “control relays” of the ladder diagram can be replaced by software
which means less hardware failure.
3. It is easier to make changes in a programmed sequence of events when it is only
a change in software.
4. Special functions, such as time-delay actions and counters, are easy to produce
in software.
5. PLCs are more reliable as software bugs can be removed through software
compilers.
6. Reusability of is circuit is increased by simple one can copy a ladder diagram
circuit multiple time.
7. PLC program resides in IC chip; thereby it takes very little space as compared
to relay controller circuits.

Industrial Drives and PLC Lab Page 4


Difference between PLC & Microcontroller

PLC and Micro-controller can be chosen for some applications interchangeably. There
major differences are listed below:

1. PLC is a special microcontroller designed for industrial application used for


controlling machinery & processes whereas microcontroller is a microprocessor
that can be programmed for any type of applications.
2. PLC is programmed using ladder diagram whereas microcontroller is
programmed using C or Assembly Language.
3. PLC process is optimized to scan the inputs and determines the outputs based
on the logical conditions programmed into it by the user whereas
microcontroller is a general-purpose IC.
4. PLC come in a package of Inputs units, Output unit containing LEDs &
processing unit, whereas microcontroller comes in a simple IC.
5. PLC is more useful in high power applications whereas microcontroller is more
suitable to low power applications.
6. PLC is not efficient in extensive calculations whereas microcontroller can
perform arithmetic calculations more efficiently.

Lab Task:
1) Describe function of Relays.
2) What is the difference between Timers, Relays and Counters?

Industrial Drives and PLC Lab Page 5

You might also like