0% found this document useful (0 votes)
76 views34 pages

PLC Lecture 3

The document provides an introduction to programmable logic controllers (PLCs), including: - Explanations of sinking and sourcing connections for configuring PLC inputs and outputs. - Descriptions of the main types of PLCs: compact PLCs with fixed I/O and modular PLCs that allow expansion. - An overview of common PLC applications in industries like manufacturing, and examples of typical uses. - Details on common PLC programming languages like ladder logic, functional block diagrams, and structured text. Basic logic operations and examples are also covered.

Uploaded by

mariam nkoyooyo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views34 pages

PLC Lecture 3

The document provides an introduction to programmable logic controllers (PLCs), including: - Explanations of sinking and sourcing connections for configuring PLC inputs and outputs. - Descriptions of the main types of PLCs: compact PLCs with fixed I/O and modular PLCs that allow expansion. - An overview of common PLC applications in industries like manufacturing, and examples of typical uses. - Details on common PLC programming languages like ladder logic, functional block diagrams, and structured text. Basic logic operations and examples are also covered.

Uploaded by

mariam nkoyooyo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

UTC BUSHENYI

DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

INTRODUCTION TO PLCS

BY ATWIJUKIRE CHRISTOPHER

0772114439

atopherchris88@gmail.com

PLC configuration
When a PLC is to connected to the inputs and the outputs, there is chances that it will not
function properly due to incorrect connections. This depends on the manufacturers’
specifications and the types of sensors used. There are two ways how PLCs can be
configured which include:

I. Sinking connection
II. Sourcing connection

In general, sinking (NPN) and Sourcing (PNP) are terms that define the control of direct
current flow in a load. They are only pertinent with DC components and should not be
associated with AC control structures. Devices like relay outputs, reed switches, etc, are
typically not affected since they are not current direction dependent (unless they have
internal polarity sensitive devices like LEDs or unidirectional spike suppressors).

Sinking provides a path to supply common (-)

Sourcing provides a path to supply source (+)


Sourcing connection

Types of PLCs

The two main types of PLC are fixed / compact PLC and modular PLC.
Compact PLC
Within a single case, there would be many modules. It has a fixed number of I/O modules and
external I/O cards. So, it does not have the capability to expand the modules. Every input and
output would be decided by the manufacturer.

Modular PLC
This type of PLC permits multiple expansion through “modules”, hence referred to as Modular
PLC. I/O components can be increased. It is easier to use because each component is
independent of each other.

PLC Applications
Since its inauguration, the PLC has been successfully applied in virtually every segment of
industry, including steel mills, paper plants, food-processing plants, chemical plants, and power
plants. PLCs perform a great variety of control tasks, from repetitive ON/OFF control of simple
machines to sophisticated manufacturing and process control.

A few of the major industries that use programmable controllers, as well as some of their typical
applications.
Programming languages
A Programming Language provides rules for combining the instructions so that they
produce the desired actions
When using a PLC, it’s important to design and implement concepts depending on your
particular use case.

A PLC program consists of a set of instructions either in textual or graphical form, which
represents the logic that governs the process the PLC is controlling. There are two main
classifications of PLC programming languages, which are further divided into many sub-
classified types.

1. Textual Language
• Instruction list
• Structured text
2. Graphical Form
• Ladder Diagrams (LD) (i.e., Ladder Logic)
• Function Block Diagram (FBD)
• Sequential Function Chart (SFC)
Although all of these PLC programming languages can be used to program a PLC, graphical
languages (like ladder logic) are typically preferred to textual languages (like structured text
programming).

Ladder Logic
Ladder logic is the simplest form of PLC programming. It is also known as “relay logic”. The
relay contacts used in relay-controlled systems are represented using ladder logic.
The below figure shows a simple example of a ladder diagram.
PLC Ladder Logic

In the above-mentioned example, two pushbuttons are used to control the same lamp load. When
any one of the switches is closed, the lamp will glow.

The two horizontal lines are called rungs and the two vertical lines are called rails. Every rung
forms the electrical connectivity between Positive rail (P) and Negative rail (N). This allows the
current to flow between input and output devices.
Functional Block Diagram (FBD) is a simple and graphical method to program multiple
functions in PLC. A function block is a program instruction unit that, when executed, yields one
or more output values.

It is represented by a block as shown below. It is represented as a rectangular block with inputs


entering on left and output lines leaving at the right. It gives a relation between the state of input
and output

Function Block

The advantage of using FBD is that any number of inputs and outputs can be used on the
functional block. When using multiple input and output, you can connect the output of one
function block to the input of another. Thereby building a Function Block Diagram.

Example: Functional Block Diagram


The figure below shows various function blocks used in FBD programming.

Functional Block Programming

The figure below shows a ladder diagram and its function block equivalent in Siemens notation.
Ladder to functional block diagram

Ladder to functional block diagram

Why ladder logic?

• The Ladder logic programming language is an adaptation of an electrical relay


wiring diagram, also known as ladder diagram.
• Ladder Logic is a graphical system of symbols and terms even those not familiar
with relay wiring diagram can easily learn it.
Electrical Ladder Diagram

Ladder Logic is evolved from electrical ladder diagrams, which represents how electrical
current flows thru the devices to complete an electrical circuit.

An electrical diagram consists of two vertical bus lines or power lines, with current
flowing from left bus to the right bus.

Each electrical circuit in the diagram is considered a rung.

Every rung has two components

 It contains at least one device that is controlled


 It contains the condition(s) that control the device.

LADDER RELAY INSTRUCTIONS

Ladder relay instructions are the most basic instructions in the ladder diagram instruction
set. These instructions represent the ON/OFF status of connected inputs and outputs.
Ladder relay instructions use two types of symbols: contacts and coils. Contacts represent
the input conditions that must be evaluated in a given rung to determine the control of the
output. Coils represent a rung’s outputs.

In a program, each contact and coil have a referenced address number, which identifies
what is being evaluated and what is being controlled. The address number references the
I/O table location of the connected input/output or the internal or storage bit output. A
contact, regardless of whether it represents an input/output connection or an internal
output, can be used throughout the control program whenever the condition it represents
must be evaluated.

Ladder logic is the primary programming languages for PLCs. It is derived from relay
logic diagrams.

The primitive logic operations are: OR, AND, NOT

OR OPERATION

Control behavior: the light should be on when either switch A is on (i.e closed) or switch B
is on (closed). Otherwise, it should be off.

Task: implement this behavior using

• Relay circuit
• PLC ladder logic
Switches A and B are connected in parallel to relay coils AR and BR respectively.

When switch A (or switch B) is closed, relay coil AR (or BR) gets energized.

The Normally open (NO)contact AR (or BR) gets closed. power is transmitted to coil LR

Relay coil LR gets energized, then NO contact LR gets closed, power is transmitted to the
light bulb.
Relay ladder logic circuit

The above shows two rungs of relay ladder logic diagram, Switch A and B are connected
to discrete input channels of the PLC, light is connected to discrete output
channel(actuator) of the PLC.

When input switch A (or switch B) is on, the light is on.


AND operation

Control behavior: The light should be on when Switch A is on (i.e. closed) and switch B is
on (closed). Otherwise, it should be off.

Task: implement this behavior using;

Relay circuit

PLC ladder logic

Switches A and B are connected in series to relay coils AR and BR respectively. When
switch A is closed, relay coil AR gets energized, the Normally open NO contact AR gets
closed, power flows to Normally open (NO)contact BR, where it terminates until BR is
energized. Subsequently, when BR gets energized, LR is energized, which causes the NO
contact LR to close, power is transmitted to the light bulb.

PLC ladder logic circuit

NOT operation

Control behavior: The light comes on only when Switch A is on (i.e. closed) and switch B
is off (open). Otherwise, it should be off.

Task: implement this behavior using:

• Relay circuit
• PLC ladder logic
Switches A and B are connected to relay coils AR and BR respectively. When witch A is
closed, relay coil AR gets energized. When switch B is off(on) relay coil BR is not
energized and BR contact is normally closed (normally open)

PLC ladder logic

NAND operation

NAND (NOT AND)

Control behavior: the light comes on only when switch A is off and Switch B is off.
Otherwise, it should be off.

Task: implement this behavior using

• Relay circuit
• PLC ladder logic
Relay circuit

Ladder logic circuit


PLC BASIC CIRCUITS
When writing a plc program, it is better to first master the basic circuits before coming up
with a complex ladder program.

The basic circuits include:

- On circuit
- OFF circuit
- AND circuit
- NAND circuit
- OR circuit
- NOR circuit
- Latching circuit
- ORDER operation circuit

- Interlock circuit.

The combination of the above circuits and introducing circuits which include Timer and
counter instructions can help in coming up with more complex circuits which are used in
automation of factories.

The above basic circuits are explained below to get familiar to writing a PLC program.

1. ON CIRCUIT
This circuit is used to start an operation. It uses a NO contact.

Operation.

When push button switch 1 is pressed, the indicator lamp 1 turns ON and when it is
released, the indicator lamp 1 turns OFF.

Create a ladder program for the above operation


Ladder program

F.B.D

Time chart
T1 T2
I1 0 1
Q1 0 1

2. OFF CIRCUIT
This circuit is used to stop an operation. It uses a NO contact in the ladder program when
the switch is a B-contact. But when the switch is an A-contact, the contact in the program
should be a NC contact.

Operation.

Immediately the PLC is turned to run mode, the indicator lamp 1 turns ON and When push
button switch 1 is pressed, the indicator lamp 1 turns OFF and when it is released, the
indicator lamp 1 turns ON again.
Create a ladder program for the above operation

Ladder program

F.B.D

Time chart
T1 T2
I1 0 1
Q1 1 0

3. AND CIRCUIT
This circuit consists of series instructions which are NO contacts in that all inputs should
turn ON to have an output

Operation.

When push button switch 1(PB1) and push button switch 2 (PB2) are pressed, the indicator
lamp 1 turns ON and when it is released, the indicator lamp 1 turns OFF. But when either
PB1 or PB2 is pressed alone, the lamp does not turn ON.

Create a ladder program for the above operation


Ladder program

F.B.D

Time chart
T1 T2 T3 T4
I1 0 1 0 1
I2 0 0 1 1
Q1 0 0 0 1

4. NAND CIRCUIT
This circuit consists of series instructions which are NO contacts switching the output
through an inverted output. In this circuit, all inputs should be ON to have NO output.
Operation.

Immediately the PLC is turned to run mode, the indicator lamp 1 turns ON. Whether PB1
or PB2 is pressed, the lamp remains ON. But when both switches are pressed, the lamp
turns OFF. And when released, the lamp turns ON again.

Create a ladder program for the above operation

Ladder program

FBD

Time chart
T1 T2 T3 T4
I1 0 1 0 1
I2 0 0 1 1
Q1 1 1 1 0
5. OR CIRCUIT
This circuit consists of parallel instructions which are NO contacts. This circuit gives
alternative instructions to have an output

Operation.

When push button switch 1 (PB1) OR push button switch 2 (PB2) is pressed, indicator
lamp 1 turns ON and when released, the indicator lamp 1 turns OFF. But when both PB1
and PB2 are pressed, the lamp turns ON.

Create a ladder program for the above operation

Ladder program

FBD
Time chart
T1 T2 T3 T4
I1 0 1 0 1
I2 0 0 1 1
Q1 0 1 1 1

6. NOR CIRCUIT
This circuit consists of parallel instructions which are NO contacts that switches the output
of a PLC through an inverted internal output. It will have no output when all or one of the
input is turned ON

Operation.

Immediately the PLC is turned to run mode, the indicator lamp 1 turns ON.

When push button switch 1 (PB1), push button switch 2 (PB2) is pressed or Both are
pressed, indicator lamp 1 turns OFF. But when released, the lamp turns ON again

Create a ladder program for the above

Ladder program
FBD

Time chart
T1 T2 T3 T4
I1 0 1 0 1
I2 0 0 1 1
Q1 1 0 0 0

Trials

1. Draw a ladder diagram and F B D for time charts below where 𝐼1 ,𝐼2 and 𝐼3 are
NO push button switches while 𝐼4 is NC push button switch a)

𝑇1 𝑇2 𝑇3 𝑇4 𝑇5 𝑇6 𝑇7 𝑇8

𝐼1 0 1 0 0 0 1 0 1

𝐼2 0 0 1 0 0 1 1 1

𝐼3 0 0 0 1 0 0 1 1

𝑄1 1 1 1 1 1 1 1 0

Ladder diagram

FBD
7. Latching CIRCUIT
This circuit is sometimes referred to as self-holding, retaining or self-sustaining circuit.

Latching relays are designed to hold the relay contact closed after power has been
removed from the coil Latching relays are used where it is necessary for contacts to stay
open and or closed even though the coil is energized only momentarily. The latch coil is
momentarily energized to set the latch and hold the relay in the latched position.

Operation.

When push button switch 1 (PB1) is pressed and released, indicator lamp 1 turns ON and
stays ON. But when PB2 are pressed, the lamp turns OFF.

Create a ladder program for the above operation

Ladder program
ALTERNATIVELY

FBD

Not 𝐼2 IS NO PBS.

Time chart
𝑇1 𝑇2 𝑇3 𝑇4 𝑇5

𝐼1 0 1 0 0 1

𝐼2 0 0 0 1 1

𝑄1 0 1 1 0 0

LATCHING.
CASE II

Using NC push button switch ( 𝐼4) as a stop switch.

Ladder program

Function Block

TASK

Modify the above circuit to have a ladder program that operates as below.

When PB1 is pressed and released, indicator lamp 1 turns ON and stays ON.
And when PB2 is pressed and released, indicator lamp 2 turns ON and stays
ON. But when PB3 is pressed, all the lamps turn OFF

Ladder program

Time chart.
8. ORDER OPERATION CIRCUIT

This circuit works in a sequential order. For an example a process having two circuits A
and B, this means that circuit B can not turn ON before circuit A does.

Operation.

When PB1 is pressed and released, indicator lamp 1 turns ON and stays ON

When PB2 is pressed and released, indicator lamp 2 turns ON and stays ON.
But when PB3 is pressed, all lamps turn OFF

Note: when lamp 2 can not turn ON before lamp1 does.

Create a ladder program for the above operation


Ladder program
FBD

9. INTERLOCK CIRCUIT
This is one of the safety circuits used in industrial automation. When used, it prevents two
or more operations turning on at the same time.

Operation.

When PB1 is pressed and released, indicator lamp 1 turns ON and stays ON

When PB2 is pressed and released, indicator lamp 2 turns ON and stays ON.
But when PB3 is pressed, all lamps turn OFF

Note: when lamp 1 is ON, lamp 2 is disabled and when lamp 2 is ON, lamp 1 is disabled.

Create a ladder program for the above operation


Ladder diagram

Time chart.
𝑇1 𝑇2 𝑇3 𝑇4 𝑇5 𝑇6 𝑇6

𝐼1 0 1 0 0 0 0 0

𝐼2 0 0 0 0 1 0 0

𝐼3 0 0 0 1 0 0 1

𝑄1 0 1 1 0 0 0 0

𝑄2 0 0 0 0 1 1 0
Applications

- Forward and reverse control


- Star delta starter
- Change over switch
- Lifts
- cranes
- hoists

Modification 1

Modify the above circuit by using PB𝑠4 instead of PB𝑠3 as a stop switch.

Modification 2:

Add another lamp on modification 1 to create an interlock circuit of three.

You might also like