Nothing Special   »   [go: up one dir, main page]

PLC Planner: Your Uniqueness Is Your Worthness

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 72

PLC PLANNER

YOUR UNIQUENESS IS YOUR WORTHNESS


Here we will learn about PLC Programming Concept.

PLC Programming Concept


• Ladder logic is used to develop software for Programmable Logic
Controllers, PLC, that are used in industrial control applications. So
devices are connected to the input and output module within PLC
and according to the software, controlling industrial applications
happen. The name ladder logic programming came from the fact
that the program at the end looks similar to a ladder with different
instructions and rungs. PLC ladder logic programming basics begin
in making a clear distinction between input and output within the
program itself. In PLC ladder logic, generally speaking, inputs are
written on the left side of the ladder logic. Outputs are on the right
side. You will learn later in the course that not all inputs and
outputs are necessarily connected to a physical device, but for
simplicity let's assume so for now. The left and right rails indicate
the positive and the ground of the power supply. Electrical current
flows from left to right. 

Programming Concept
PLC Ladder Logic
Programming
PLC
SOFTWARE

POW
ER
SUPP
INPUT
Devices

LY
PROCE
SSOR
al

INPU
Digit

T
PLC

MOD
al

OUT
ULE
Digit

PUT
MOD
INPU
og

ULE
Anal

T
MOD
DEVICES
OUTPUT
og

OUTP
ULE
Anal

UT
MOD
ULE
Logic Software
I/P O/P
M MO
INPUT OD D OUTPUT
Devices DEVICES
U U
L L
E E
 Ladder logic Diagram
Input Output
Coil Coil

Switch, Light, Motor,


Sensor, etc. etc.

INPUT & OUTPUT


Logic Flow Way
Left Right

Electric Current Flow Way

Left Power Rail Right Power Rail


(Positive Rail) Rung 1 (Ground Rail)

Rung 1
Rung 2

Rung 3

END
END Rung

PLC Ladder Logic Programming Designing


Example Pending
THANK YOU
• Here we will learn about Input
Instructions.

Input Instructions
• Let's take a look at what input means in PLC ladder logic programming. The way we write input is
as following: as two bars facing each other representing the input. And to differentiate between
the physical input device and the input within the software, we will refer to the input in the PLC
program as input instruction. There are two main types of input instructions; Examine If Closed,
XIC, and sometimes called normally open, Examine If Open, XIO, and sometimes it's called
normally closed. Notice, that the only difference between them, is that the XIO has a sidebar that
indicates it's already closed and we're examining if it opens. In ladder logic program, the
instruction is highlighted when the logic state is true. I'll be using a green highlight in the slides
here, similar to what is used in Allan-Bradley software. However, it's very similar in any other PLC
types. Different colors might be used in different software's but they all indicate the same concept.

• Input instruction take the signal from the Physical input device and the physical input device
Input Instructions Details
connect to the PLC input module terminal. Then the memory bit store the input addressing. Bit
address condition(True & False) operate to the input instruction.
INPUT
Representing Input Symbol

Two type of INPUT Instruction

XIC INPUT Examine If XIO INPUT Examine If


Instruction Closed Instruction Open

Normally Open Normally Closed


Instruction (NO) Instruction (NC)
Without trigger of the Input instruction

Normally Open
Instruction (NO)

Normally Closed
Instruction (NC)

After trigger of the Input instruction

Normally Open
Instruction (NO)

Normally Closed
Instruction (NC)
MEMORY ADDRESS BIT
INPUT
INPUT DEVICE MODULE
OF PLC
0 1

If input device is If input device is


OFF ON
False Condition True Condition of
of Logic Logic

De-energized Input Energized Input


Examine If Closed (XIC) Input Instruction

This input instruction works as a ON and OFF condition.

0
When memory address bit is zero,
the logic state will False.

Not Energized Input


Normally Open
Input Instruction (NO)

1
When memory address bit is one,
the logic state will True.

Energized Input

The green highlighted represent the true logic state.


Examine If Open (XIO) Input Instruction

This input instruction works opposite to the instruction of XIC.

0
When memory address bit is zero,
the logic state will True.

Energized Input
Normally Closed Input
Instruction (NC)

1
When memory address bit is one,
the logic state will False.
Not Energized Input

The green highlighted represent the true logic state.


Input
Instruction False (0) True (1)
Examine If
Closed (XIC)

Examine If
Open (XIO)

The Input instruction is


always placed in the left
hand side of the ladder
logic.
THANK YOU
• Here we will learn about Output
Instructions.

Output Instructions
Representing Input Symbol
OUTPUT

There are Three type of OUTPUT Instruction.

Output Energized (OTE)

Output latch (OTL) L

Output Unlatch (OTU) U


The output instruction receives the signal from the input instruction
and the output is turn on when the input logic is in the true condition
and off when the input logic is false conditions.

INPUT OUTPUT

The output instruction is always placed in the right


hand side of the ladder logic.
MEMORY ADDRESS BIT
OUTPUT
Light
Light MODULE
OF PLC
0 1

The same thing


applicable for the
output device.
Output energized
and de-energized
depend to the
specific memory bit
location.
Input Press = Output ON
PB OUTPUT

MEMORY ADDRESS BIT


Push Light
Light
Button 1

Input Released = Output OFF

Push MEMORY ADDRESS BIT


Light
Light
Button 0
PB OUTPUT
Wrong way of program

Right way of program


INPUT OUTPUTS

INPUTS OUTPUTS
Software Demo
THANK YOU
I/O EXAMPLE 1

• Here we will learn about I/O example with push button and light.
•  So let's try to take an example that demonstrates how the input instructions, XIC
and XIO and Output instruction work. So in a simple example we have a normally
opened push button that's connected to a light using PLC. The input device
provides the input module with a status of the device. Example if it's on or off, and
using this memory location within the program reflects the change. The same
thing applies for an output device where the specific memory location within the
output module is to reflect any changes accordingly. So, the input device, which is
the push button is connected to the PLC input module and the output device
which is light is connected to the output module of the PLC. So let's see how the
Ladder Logic Program behaves when using Examine If Closed instruction. Using XIC
instruction, the instruction is only activated when the memory location is one. So,
when the push button is not pressed, this means that the logic state is zero and
I/O with a push button and light
the instruction is false and…
Example: 1
(Push Button and Light)

PLC
Digit Digit Anal Anal
al al og og

SUPP
PROCE
POW

OUTP
MOD
INPU

MOD

MOD
INPU

MOD
OUT

ULE
ULE
PUT

ULE
ULE
SSOR
ER

LY

UT
T

T
Push
Light
Light
Button
MEMORY ADDRESS BIT
INPUT
Push
MODULE
Button OF PLC
0 1

Input device provide the


active condition through
the Memory addressing
bit and memory location
bit reflected to the output.
MEMORY ADDRESS BIT
OUTPUT
Light
Light MODULE
OF PLC
0 1

The same thing


applicable for the
output device.
Output energized
and de-energized
depend to the
specific memory bit
location.
INPUT MODULE OF OUTPUT MODULE OF
PLC PLC
Logic Software

Push
Button
Light
Light

Input device connect to the Input Module of the PLC.

Output device connect to the Output Module of the PLC.


Now we are discussing about
examine if closed input(XIC)
instruction and Output
energized instruction (OTE).
XIC Instruction

Examine If Closed Instruction (XIC) 0 1


Normally Open Instruction (NO)

NO Push
Button Light
Not Pressed Condition

NO Push
0 Button Light

When the NO push button is not pressed, that means the logic state is false and
the instruction bit is zero and the light will not turn ON.
Pressed Condition

NO Push
1 Button Light

When the NO push button is pressed, that means the logic state is true and the
instruction bit is one and the light will turn ON.

Instructions reads a memory location and according to the value


there, it will be highlighted.
Short Video on XIC and OTE instruction with the
software
XIO Instruction

Examine If Open Instruction (XIO) 0 1


Normally Closed Instruction (NC)

Activated Not Activated


Input Input Instruction
Instruction

NC Push
Button Light
Not Pressed Condition

NC Push
0 Button Light

When the NC push button is not pressed, that means the XIO instruction is True,
logic state is zero and the instruction memory bit is also zero then the light will be
turn ON.
Pressed Condition

NC Push
1 Button Light

When the NC push button is pressed, that means the XIO instruction is False, logic
state is one and the instruction memory bit is also one then the light will not turn
ON.
Short Video on XIO and OTE
instruction with the software
THANK YOU
I/O EXAMPLE 2

• In this topic we will learn about more


then two alternating light how to
connect with the inputs and hoe to
glow.
• So, let's take another simple example to show the uses of input and output
instruction. In this example, we are trying to achieve an alternating light. We have
a Pushbutton connected to the input module of the PLC and the two lights are
connected to the output module of the PLC. When the Pushbutton is pressed, a
green light is on. When the Pushbutton is not pressed, a red light is on indicating
that the Pushbutton is not pressed. In any example, try to do it one step at a time,
so first, we are using an XIC instruction to program the Pushbutton. Remember, XIC
instruction is highlighted when the memory location is one and then, we add a
green light as an output, so now the program works this way. When the
Pushbutton is pressed, the instruction is highlighted. The green light turns on as a
I/O with alternating lights
results. Now, the question is, when the Pushbutton is not pressed, a red light turns
on. Remember, we are using the same Pushbutton. So, let's take an advantage of
the XIO instruction…
Example: 2
(Push Button & Light)

PLC
Digit Digit Anal Anal
al al og og

SUPP
PROCE
POW

OUTP
MOD
MOD
INPU

MOD
INPU

MOD
OUT

ULE
ULE
PUT

ULE
ULE
SSOR
ER

LY

UT
T

T
NO Push Light
Light 11
Button 1

NO
Push Light
Light 22
Button 2
AN M
CH RA
GE
INPUT MODULE OF OUTPUT MODULE OF
PLC PLC

OG
Logic Software Light
NO Light
Push 11

RM PR
Button

NO
Push
Light
Light

F O NG
AT
Button 22

O
WR
NO Push
Button 1 MEMORY ADDRESS BIT
INPUT
MODULE
OF PLC
NO Push 0 1
Button 2

Input device provide the


active condition through the
Memory addressing bit and
memory location bit reflected
to the output.

Green Light
PB 1

PB 2 Red Light
Light
Light MEMORY ADDRESS BIT
11 OUTPUT
MODULE
Light OF PLC
Light
22 0 1

The same thing applicable for the


output device.
Output energized and de-energized
depend to the specific memory bit
location.

Light 1

Light 2
Not Pressed Condition

PHYSICAL PUSH PHYSICAL


BUTTONS OUTPUTS

MEMORY ADDRESS BIT


NO Push Light
Light
Button 1
0 11

MEMORY ADDRESS BIT


NO Push Light
Light
Button 2 22
0

The color here shows Software Logic


the condition of the
lamp on /off.

RED = Lamp ON
GREEN = Lamp OFF
Pressed Condition

PHYSICAL PUSH PHYSICAL


BUTTONS OUTPUTS

MEMORY ADDRESS BIT


NO Push Light
Light
Button 1
1 11

MEMORY ADDRESS BIT


NO Push Light
Light
Button 2 22
1

The color here shows Software Logic


the condition of the
lamp on /off.

RED = Lamp ON
GREEN = Lamp OFF
THANK YOU
• Tip on Hardware and Software about inputs.

Tip
• Let's take a look on how the field devices and the program instructions work
together and how to differentiate between them. To differentiate input devices
and input instructions, we refer to the physical devices as a field input devices or
contacts and the input within the PLC program as input instructions. There are two
common types of field devices relay that we usually deal with. A normally open
and a normally closed relay. This can apply to any field device. This is how a
normally open pushbutton looks like and this is how a normally closed pushbutton
looks like. You can check this document for more details about the different
symbols by simply going to page 38, you can find the different symbols for the
Field devices and program
contacts, switches, and relays. This is the example that we covered for the
instructions
pushbutton. A normally open pushbutton contact and a normally closed
pushbutton contacts. In the simulation software, you can change the type of the
contact by right click on the device…
• Here we will see how to work field devices in hardware and program
instruction in software together and how to differentiate between
them.
Hardware Input Software Input
devices with PLC
Programming

Physical Input Input


devices Instructions
(Contacts)
Symbols

There are mainly two types of physical


input relays used in the field.

Normally Open
Relay Contact

Normally Closed
Relay Contact
Normally Open
(NO) Push Button

Normally Closed
(NC) Push Button
Software look like of I/O
pushbutton overview demo
Normally Open (NO)
Push Button
Field Device Relay
Contacts Overview
Normally Closed (NC)
Push Button

Examine If Closed
(XIC)
Programming
Instructions
Examine If Open
(XIO)
THANK YOU
Two input communication logics are
used between physically and
programming.

Examine If Closed (XIC)


Logic Examine If Open (XIO) Logic

Physical Normally
Open (NO) Push
Button
Logic 1 (XIC)

Physical Programming Hardware Hardware


Connect Connect Connect Connect
Contact Instruction Contact Instru
NO
• Let's see what an output instruction in PLC ladder logic programing. The way we
write an output instruction is similar to two brackets as you see and to
differentiate between the physical output device and the output within a program,
we refer to the output as output instruction. There are three main types of
outputs. An empty bracket is referred to an output energize, OTE. The other two
types are output latch, OTL, output unlatch, OTU. Outputs are written in the right-
hand side. So, what's an output instruction? An output instruction represents the
action that is to be taken when the input instructions or instructions are true.
Basically, when the rung is true, the output is activated as a result and since the
output is connected to a memory address and according to that bit as status, the
Output Instructions
device turn on or off. A physical output device is connected to the output module
of the PLC and work accordingly. Output is always the last instruction before the
right power rail…
• Let's take an example that can demonstrate the differences between contacts and
instructions. We'll take a simple example that shows how the program behaves
when using a normally open contact, which is a physical device, and using two
different instructions within the software. It might sound repetitive but I want to
compare the effect of using a normally open, and normally closed contacts. The
next video, will take a normally closed contact with the same instructions. For this
one, we are going to count straight on normally open contact, or relay, and using
two types of instructions. So let's see what happens when using a normally open
relay and having two different instructions in the PLC, examine if closed and
examine if opened. Let's assume that we have a push button that is in normally
open relay. It's connected to the input module in the PLC and a light connected to
Normally open (NO) contact with XIC
the output module in the PLC. And remember, that field devices and program
instructions are not the…
and XIO
• Now, we'll take the same previous example but use a normally closed contact
instead. So using a normally closed relay and having two different instructions in
the PLC program. Examine if closed. Examine if open. A normally closed contact is
normally closed and it provides the electrical continuity. It opens when the contact
is pressed. The physical contact is open. Now, we're using a normally closed
pushbutton that is connected to an input module in PLC. And a red light connected
to the output module in PLC. For a normally closed contact pushbutton, if the
pushbutton is not pressed, the memory location connected to that pushbutton
within the module is showing one. As soon as the pushbutton is pressed, the
continuity changes and then the memory address changes its state to zero. There
is no physical continuity. Now let's see what happens in the program when using
two different instructions. Using XIC, remember XIC instruction is activated when
the memory location is one…

Normally closed (NC) contact with


XIC and XIO

You might also like