0% found this document useful (0 votes)
945 views40 pages

Ladder Logic Symbols

The document provides information about basic ladder logic symbols used in programmable logic controllers (PLCs). It defines and explains commonly used symbols like normally open contacts, normally closed contacts, outputs, one shot detection, timers, comparisons, and math instructions. It also discusses how relay logic uses physical relays to perform control functions, while ladder logic translates relay logic into a graphical programming language that can be implemented through PLCs.

Uploaded by

Md Shahin Ahmed
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)
945 views40 pages

Ladder Logic Symbols

The document provides information about basic ladder logic symbols used in programmable logic controllers (PLCs). It defines and explains commonly used symbols like normally open contacts, normally closed contacts, outputs, one shot detection, timers, comparisons, and math instructions. It also discusses how relay logic uses physical relays to perform control functions, while ladder logic translates relay logic into a graphical programming language that can be implemented through PLCs.

Uploaded by

Md Shahin Ahmed
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/ 40

Ladder Logic Symbols

The ladder logic symbols that are used in ladder logic programming have been derived from
traditional relay logic control circuits. If you have a basic knowledge of electric circuits then
getting started in ladder logic programming should be a breeze.

If not, don’t worry, ladder logic is a graphical programming language and getting to know the
basic ladder logic symbols and concepts is quite easy.

Learning the basic ladder logic symbols will give you a solid foundation.

Generally speaking a large majority of real world applications can be accomplished with the
basic ladder logic symbols outlined below.

As your desire to program complex automation and process control functions increases then
higher level ladder logic symbols can be used.

These include, but are not limited to math operations, PID loops, data manipulation and data
conversion.

Normally Open Contact

Operation:

If the condition is TRUE then the expression is CLOSED.

Normally Open Contact – State Diagram

Common Uses:

Start Push buttons.


Selector switches.
Digital instrumentation.
Internal programming.

Normally Closed Contact

Operation:

If the condition is TRUE then the contact is OPEN.

Normally Closed Contact -State Diagram

Common uses:

Stop Push buttons.


Fail safe instrumentation.
Motor Thermal Overloads.
Internal programming.

Output

Operation:

If the input condition is TRUE then the output is ON.


Output – State Diagram

Common uses:

Motor Contactors.
Actuators.
Indication lamps.
Warning sirens.
Internal programming.

One Shot – Positive Edge Detection

Operation:

If the input condition transitions from FALSE to TRUE then the output is ON, for the time
taken to do one PLC program scan.

One Shot – State Diagram

Common uses:

Counting applications.
Math commands.
Data Transfer commands.
Latch output during a specific set of conditions.

Timer Delay On

Operation:

If the input condition is TRUE then the timer begins.

When the pre-set time has been reached the output turns ON.

If the input condition goes FALSE, at any stage, the timer stops and the output turns OFF as
well.

Timer Delay On – State Diagram

Common uses:

Time delay for Sirens.


Star/Delta Motor Starters.
Sequence start delays.
De-bounce time delay to fix digital instrumentation flicker.

Timer Delay Off

Operation:

If the input condition is TRUE then the output turns ON.


Then if the input condition goes FALSE the timer begins.

When the pre-set time has been reached the output turns OFF.

If the input condition goes TRUE, at any stage, the timer stops and the output turns ON as well.

Timer Delay Off – State Diagram

Common Uses:

Run on time Delay

Comparison –
Greater Than or Equal To

Less Than or Equal To

Equal To

Operation:

If the comparison between two inputs is TRUE then the output turns ON.
Common uses:

Product Stacking and Un-Stacking complete.


Batching system weight set point achieved.
Alarm & Fault activation (Temperature, Flow, Motor Current etc).

Math Instructions –
Addition

Subtraction

Multiplication

Division

Operation:

Executes the mathematical operation and outputs the result.

Common uses:

Scaling of Analogue Inputs and Outputs (Temperature, Flow, Motor Current, Weight etc).

Calculating Motor Speed and Position profiles.


In the next section were we will fast forward your learning of ladder logic programming by
understanding basic operating principles of relay control circuits and also discover the
difference between relay logic and ladder logic.

Relay Logic Vs Ladder Logic


Some of the other problems with implementing relay logic are:

 Requires a lot of switchboard space.


 Installation is very labor intensive.
 Trouble shooting is extremely difficult.
 Modifications to the control functionality are complicated and seriously tedious.

The advent of the microprocessor meant that relay logic control functionality could be
programmed and stored in a computer. In the late 1960’s some really brainy people realized
this and pressed ahead to create a device called a Programmable Logic Controller (PLC).

Relay logic in a PLC is the method of formulating logical expressions in order to automate
machinery and processes in industrial applications. The programming language that is
used to create relay logic in a PLC is called Ladder Logic.

This was a massive breakthrough in the industrial automation industry which would eventually
render relay logic control systems near redundant.

In an automated control system the main advantages of a PLC over relays are:

 Easier to develop complex logical expressions with ladder logic software.


 Increased reliability with PLC life easily reaching +10years,
 Easier and cheaper to modify or expand the control system at a later date.
 Reduced design, installation and component costs.
 Virtually maintenance free compared to relays.
 Superior monitoring and reporting functionality making process trouble shooting
and optimization easier.

How Do Relay Logic Systems Work?


Relay logic systems are a network of hard wired electrical components. The relay is the
fundamental component and it works by switching electric circuits on and off to form
logic operations that in turn provide process control to the system. You can think of relay
logic systems as a mechanical computer that does computation with 1’s and 0’s by
switching relays instead of using a silicon chip.

The fundamental component of a relay logic is the relay. So let’s look at how relays work in a
little more detail…
What Is A Relay?

A relay is an electromechanical device that consists of two basic components, a relay coil and
relay contact. The relay contact is used to switch a circuit on or off and the relay coil is used to
change the state of the relay contact. The three main types of relays are spring return relays,
latching relays and multipole relays.

Why Are Relays Used In Control Circuits?

Relays are used because they allow electric isolation between the switching circuit (contact)
and control signal circuit (coil) via means of electromagnetics. That means relays can be used
to connect circuits with different voltage and current levels to control equipment like motors
and actuators. A relay can also switch multiple circuits with different states at the same time
making them ideal for logic control circuits in industrial automation.

What Functions Does A Relay Perform?

Relays perform 3 main functions in an electric circuit:

 Allowing control circuits to switch a load circuit even if the voltages of both circuit are
different.
 Able to switch a high current device using a low current electronic control signal.
 Relays can be wired in combination to perform logical operations using a network of
electric circuits known as relay logic.

How a Relay Works

A relay is an electromechanical device that consists of two basic components….

 Relay coil.
 Relay Contact.

A relay coil is essentially copper wire wound around a chunk of iron that is used to produce
an electromagnetic field that can attract metal. Think of a junk yard crane that is used to pick
up scrap metal. It uses the same principle to generate a magnetic field that attracts metal.

A relay contact is basically a switch that is used to turn an electric circuit on or off.

Hang on a minute! If the contacts of a relay turn an electric circuit on or off why do we need
the coil?

Well, the relay coil’s purpose is to change the state of the relay contacts. Just like your finger
is used to change the state of a light switch from off to on. So, we are changing the state of the
contacts using an electrical signal instead of your using your finger.
Electromechanical Relay

To energize the coil we need to connect it to a voltage source, which is sometimes called a
relay input.

Some common DC voltage relays are 5V relay, 12V relay and 24V relay. Some common AC
voltage relays are 120VAC relay and 240VAC relay.

The voltage rating is usually written on the casing of the relay. The coil voltage rating needs to
be adhered to otherwise the relay coil may fail to change the state of the contacts or overheat
and burn out.

When we energize the relay coil with it’s rated voltage it allows current to flow within the relay
coil and produces and electromagnetic field. This electromagnetic field is used to attract the
relay contact towards the relay coil, thus changing the state of the relay contacts.

The relay contacts are either configured normally open (NO) or normally closed (NC). Quite
often a relay will have changeover contacts.

So what is a changeover contact?

A changeover contact is the combination of both normally open (NO) and normally closed
(NC) contacts in the same contact block. The changeover contact allows selection of either the
normally open (NO) or the normally closed (NC) contact depending on the way it is wired. It
is sometimes called a double throw contact.

The contact voltage and current rating is usually written on the casing of the relay. The contact
voltage and current rating needs to be adhered to otherwise the relay contact may overheat and
burn out.

If the relay coil voltage rating and contact voltage and current rating are not written on the relay
casing then check the relay base. Sometimes it’s a combination of both the case and base. If all
else fails then consult the data sheet.

Relay Coil With Contact Voltage & Current Rating


Relay Operation

If a relay is wired to a normally open (NO) contact and the relay is energized then the contact
will change state from OPEN to CLOSED…..

Basic Relay Operation with Normally Open (NO) Contact

If a relay is wired to a normally closed (NC) contact and the relay is energized then the contact
will change state from CLOSED to OPEN…..

Basic Relay Operation with Normally Closed (NC) Contact

If a relay with changeover contacts is wired in a normally open (NO) configuration and the
relay is energized then the contact will change state from OPEN to CLOSED…..

Basic Relay Operation with Changeover Contacts wired Normally Open (NO)
If a relay with changeover contacts is wired in a normally closed (NC) configuration and the
relay is energized then the contact will change state from CLOSED to OPEN. Notice that the
wiring of the contacts has changed sides…..

Relay Operation with Changeover Contacts wired Normally Closed (NC)

Types of Relays

There are several types of relays each with their specific characteristics and uses. The 3 types
that are used frequently in industrial applications are spring return relays, latching relays and
multipole relays.

Spring Return Relay

The most common relays are spring return relays. They have one relay coil and use a spring to
return the relay contact back to it’s normal state after the relay coil is de-energized and the
electromagnetic field has collapses.

The relay coil must be energized at all times in order for the state of the relay contact to remain
in it’s changed state. As soon as the coil is de-energized then the relay contact returns back to
it’s normal state.

Can you see the spring in the “Electromechanical Relay” picture above? The spring is at the
very top of the relay.

Latching Relay

A latching relay is a type of relay that can change and maintain the state of the contact without
the need for the coil to be constantly energized. It utilizes two separate coils, each of which are
responsible for a certain state of the contact either open or closed. A short voltage pulse to
energize either coil in the latching relay is all that is required to change the state of the contact.
Multi Pole Relay

A multi pole relay is any type of relay with more than one contact. Each relay contact is called
a pole. So a relay with two contacts will be called a two pole relay and a relay with four contacts
will be called a four pole relay.

When using multi pole relays multiple coils are not required to change the state of the contacts.
The state of all the relay contacts is changed at the same time by a single relay coil.

Two Pole Relay

In short, the operation of a single pole relay is the same as a multi pole relay, we just have more
contacts to play with!

This is handy when we are activating more than one device. Especially when the devices need
different voltage levels or the combined current draw of multiple devices exceeds the current
rating of a single contact. It’s also handy having multi pole relays when the process control
logic gets complex.

How do you connect a Relay?

In order to connect a relay we need to wire the coil to a voltage supply (generally switched)
and the contacts to the load device like a light, motor, solenoid valve or another relay. This can
be done by connecting the relay coil and contact wires to the terminals of a relay base. The
relay base terminal allocation for connection is usually drawn on the relay casing, labelled on
the relay base or detailed in the relay data sheet.
How to connect a Relay

The common on a relay is the terminal associated with the part of the contact that does not
switch when the relay coil is energized. In a relay with a changeover contact it is the terminal
“common” to both the NO and NC contacts. When the common is wired correctly it is
connected to the load supply voltage.

Common On A Relay

Relay Logic Circuits

The fundamental elements of relay logic circuits are….

 Power supply.
 Relay components.
 Connection wires.

The power supply voltage needs to match the rated relay coil voltage. Also, the power supply
needs to be big enough to accommodate the current draw of all the relays when they are
energized.

The relays are selected according to the power supply’s output voltage, functionality and
current rating of the contacts required.
Because relay logic is a hard wired system some sort of wiring diagram or relay schematic
diagram is required to make sense of it all.

Now please take note, there are many ways to draw an electric circuit. Depending on which
country you are from will determine which standard relay wiring diagram you will need to
use. The way circuits are laid out and the component symbols will vary from one drawing
standard to the next. Also, some drawing standards arrange their control circuits from left to
right and some use top to bottom. Check out the sample drawings below….

Power and Relay Schematic Diagram Examples

For the purposes of this explanation a left to right arrangement will be used because it ties in
with ladder logic diagrams later on.

A relay schematic diagram consists of a supply voltage rail on the left hand side and a zero
voltage rail on the right hand side drawn as vertical lines.

The relay components and other devices are packed in between connected by wires, drawn as
horizontal lines, to form a circuit.

Relay Logic Symbols

The relay coil and relay contacts can be drawn as per the relay logic symbols diagram below….
Relay Logic Vs Ladder Logic – Relay Logic Symbols

How to Read a Relay Schematic

The most basic of relay logic circuits uses a power supply, a relay, a switch and a device that
needs to be switched ON or OFF all wired together as shown in the simple relay diagram
below….

Relay Logic Vs Ladder Logic – Relay Logic Circuit Example

The above relay logic circuit example shows a lamp (Lamp No.1) being switched on via a relay
(Relay No.1).

The first line has a rotary switch connected to the coil of Relay No.1 with the relay coil labelled
as R1.

The second line has a normally open contact from Relay No.1 also labelled R1 which is
connected to Lamp No.1.

To aid in understanding relay schematics the sequence of events is read from the first horizontal
line downwards and from the left hand side power rail to the right hand side power rail.
We read from left to right because the potential difference between the left and right hand side
power rails creates current flow in that direction. In the example relay schematics a green line
is used to highlight current flow in the circuit.

So, in the first line we start at the left hand side power rail and follow the horizontal line until
we get to the normally open Rotary Switch.

If the rotary switch is in the OPEN state there is an open circuit and current cannot flow to the
right hand side of the circuit. So the relay coil (R1) stays de-energized.

If we go to the second line we notice that the normally open relay contact (R1) stays OPEN
because Relay No.1 coil (R1) is de-energized. Therefore there is also an open circuit on the
second line so no current can flow to the lamp and it stays OFF….

Basic Relay Logic Circuit Example – With Rotary Switch Off

What happens when we turn the Rotary Switch on?

When the Rotary Switch is turned ON it’s state changes from OPEN to CLOSED.

If we look at the first line and start at the left hand side power rail then follow the horizontal
line until we get to the Rotary Switch we can observe that it is in the CLOSED state and current
can flow to the right hand side of the circuit.

So in this case the relay coil (R1) is energized and then we reach the end of the right hand side
rail.

Now let’s go to the left hand side of the second line where we notice that the normally open
relay contact (R1) has also changed state to CLOSED because the relay coil is energized.

Therefore there is a closed circuit on the second line so current can flow to the right hand side
of the circuit and Lamp No1 turns ON….
Basic Relay Logic Circuit Example – With Rotary Switch On

Let’s spice it up and add another line to the relay logic circuit.

This time we’ll use a second relay contact from Relay No1 and wire it as a normally closed
contact. Then we’ll add a second lamp (Lamp No2) to the new circuit.

In this case the operation of that lamp will be reversed. So when the Rotary Switch is OFF,
Lamp No.2 is ON and when the Rotary Switch is ON, Lamp No.2 is OFF.

Wait, what????

Don’t believe me then check out the relay logic circuit below….

Relay Reverse Logic – With Rotary Switch Off

The new relay contact in the third line is now a normally closed instead of normally open.

When Relay No.1 coil is de-energized it’s normally closed contact is in it’s normal state, that
is CLOSED.

When Relay No.1 coil is energized it’s normally closed contact changes state to OPEN.

A normally closed contact behaves the opposite of a normally open contact. It’s sometimes
referred to as reverse relay logic or just reverse logic. See below….
Relay Reverse Logic – With Rotary Switch On

Ladder Logic Control


Remember the statement earlier on this page – Ladder Logic was originally derived from Relay
Logic.

So, what is the difference between relay logic and ladder logic?

The big difference between relay logic and ladder logic is that relay logic needs to hard
wire each and every control circuit for every single control function. Whereas ladder logic
uses the assistance of a microprocessor based device called a Programmable Logic
Controller (PLC).

And, how does a PLC differ from relay logic?

The difference between a PLC and relay logic is that a PLC is a programmable device
whereas relay logic is a network of hardwired electrical devices. Both a PLC and relay
logic can perform logical computation, but a PLC does it using a microprocessor and
relay logic does it using electric circuits.

So essentially what we are doing is getting a mass of relays and wires and replacing them with
a tiny box that has awesome computing power.

Even with a PLC and ladder logic programming we still need to hard wire certain devices such
as the switches and lamps just like in the relay logic examples above. But the wiring is greatly
reduced because only the input and output devices need hard wiring. The control relays that
are used to form the control functionality and logic functions are replaced by the ladder logic
program stored internally within the PLC memory.
Relay Logic Vs Ladder Logic – Programmable Logic Controller

The format of a ladder logic diagram is similar to that of a relay logic circuit.

There is power rail on the left hand side and a power rail on the right hand side drawn as vertical
lines.

The logic programming is inserted in between the power rails and connected with horizontal
lines to form a logic expression.

Each line of the ladder logic diagram is called a rung.

STOP…. rails and rungs….That’s why the term “Ladder” is used in Ladder Logic…. Light
bulb moment!

However the symbols used are a bit different to the relay logic circuit drawings. Check out the
table below to compare the differences of the basic components…

Relay Logic Vs Ladder Logic Symbols

If we were to use a latching relay which uses two coils, one to latch (or set) the relay and the
other to un-latch (or reset) the relay. The relay symbols are represented as below….
Ladder Logic Latching Relay

To outline the difference let’s use the example above where a switch is turning two lamps ON
and OFF alternatively.

If we use a PLC with a ladder logic program we firstly need to hard wire the switch to the input
terminals of the PLC. Then we need to hard wire the lamps to the output terminals. Lastly, we
need to write our ladder logic program and load it into the PLC memory.

The diagram below shows a ladder logic diagram when the Rotary Switch is OFF….

Ladder Logic Diagram – Rotary Switch Off

The diagram below shows a ladder logic diagram when the Rotary Switch is on.

Remember the normally closed contact is reverse logic!

Ladder Logic Diagram – Rotary Switch On


Ladder Logic Advantages
Some of the advantages that ladder logic control systems have over relay logic control systems
are:

 Installation time is greatly reduced with ladder logic control systems due to the reduced
amount of hard wiring required. In other words, we only need to hard wire the input
and output devices. The control logic is implemented using software not hard wired
relays.
 Modifications to the control logic can easily be done using software to modify the
ladder logic program rather than hardware and wiring modifications that would
normally be the case with relay logic control.
 The same PLC can be used for a wide range of control system applications by simply
loading a different ladder logic program into the PLC memory.
 Control system expansion is simplified with a PLC by adding expansion modules as
opposed to complex hardware and wiring modifications that would be the case with
relay logic control.
 Ladder logic is microprocessor based which has faster execution times, is far more
reliable and longer lasting than relay logic control systems which have a large amount
of mechanical components.
 Ladder logic control systems are far more compact than relay logic control systems.

So, in the battle of relay logic vs ladder logic we can confirm that ladder logic is definitely
winning. In fact it can be said that relay logic control systems for larger installations are all but
dead. Some countries still have regulations for burner control panels to be relay logic
controlled, but these will no doubt be eventually replaced with PLC based control systems.

For some smaller installations where you have a handful of devices to control with basic
functionality it’s still handy to use relay logic for controlling the application. But with the cheap
price of PLC’s and the ease of ladder logic programming they are increasingly attractive for
even the smaller applications.

In the next section we’ll build on ladder logic basics and uncover the seven essential rules that
you must know to in order to program a Programmable Logic Controller ( PLC ) with ladder
logic diagrams along with the basics of implementing PLC ladder logic programming.

When we use the term latching in a PLC it refers to changing the state of an output to TRUE,
holding the state of that output TRUE until certain conditions occur, then returning the state
of the output back to FASLE.
Latching in a PLC
Latching is one of the most important pieces of ladder logic programming that you’ll ever
use.

This can be achieved with two methods….

1. Set and Reset instructions. In an Allen Bradley PLC they are called Latch and
Unlatch instructions. These instructions simulate the function of an
electromechanical latching relay. Advantages include flexibility in programming
because the Set (Latch) and Reset (Unlatch) symbols do not need to be in the same
rung. The disadvantage is that debugging can become more difficult because the Set
(Latch) and Reset (Unlatch) symbols may be scattered throughout the program.
2. Latching logic. Quite often hold in logic is referred to as hold in logic. It’s ok to
interchange the terms. The advantage of latching logic is that troubleshooting is easier
because the symbols used are all in the same rung. The disadvantage is that there is
some inflexibility in programming because latching logic requires all the symbols to
be on the same rung and may even overflow to the next rung. This can be restrictive
in some cases.

Simple applications requiring a latch are well suited to use latching logic.

But when it comes to more complex applications the use of Set (Latch) and Reset (Unlatch)
symbols may be required.

Sometimes it just comes to personal preference.

Latching in a PLC requires at least one input to set the latch (Input A), one input to reset the
latch (Input B) and one output to store the latch state (Output Y).

The inputs that set and reset the latch are usually momentary pulses. A great example of a
device that can provide a momentary pulse to a PLC input is a push button.

Ladder Logic Latch with SET & RESET Symbols


Let’s start with the Set (Latch) and Reset (Unlatch) logic.

Remember Allen Bradley PLC’s use Latch and Unlatch symbols.

The rungs below show the basic code.

When both Input A and Input B are FALSE then the state of Output Y does not change. If
Output Y is FALSE then it stays FALSE….
Ladder Logic Programming Examples – Ladder Latch

If Input A goes TRUE momentarily then the Set symbol changes the state of Output Y to
TRUE.

Then, after subsequent scans, if Input A changes state to FALSE it does not affect the state of
Output Y. In other words, Output Y is latched TRUE…

Ladder Logic Programming Examples – Ladder Latch (Set or Latch)

Only when Input B changes state to TRUE will the Reset symbol change the state of Output
Y back to FALSE. In other words, Output Y is now unlatched….

Ladder Logic Programming Examples – Ladder Latch (Reset or Unlatch)

Remember the PLC scan runs from left to right and from top to bottom.

So if both Input A and Input B are TRUE at the same time, then in the ladder diagram above
the first rung is evaluated and Output Y is set TRUE.

But, then the second rung is evaluated and Output Y is set FALSE.

Once the scan reaches the end of the entire program it will execute the state of Output Y as
FALSE.
Ladder Logic Latch with Hold In Logic
Using hold in logic to achieve latching has a similar outcome to using Set (Latch) and Reset
(Unlatch) symbols.

But with hold in logic both Input A and Input B are on the same rung as Output Y. Also, the
way in which the latch is SET and RESET is done differently.

Notice that Input B is a normally closed (NC) contact symbol and Output Y is used twice and
branched (or in parallel with Input A).

Ponder that thought for a second, let’s continue….

Ladder Logic Programming Examples – Ladder logic latch with hold in logic

Remember the scan goes from left to right and top to bottom.

So the scan starts from the left hand side of the rung and moves right to Input A.

If Input A goes TRUE and Input B is FALSE then Output Y goes TRUE….

The scan continues on with the rest of the program and it cycles back to the rung.

Previously Output Y had changed state to TRUE, so now Output Y that is in a branch across
Output A, also goes TRUE and there is no other change….
When the scan cycles back again from the top, if Input A goes FALSE, with Input B still
FALSE, then Output Y stays TRUE.

This is because Output Y is held in by itself using the branch across Input A.

Notice that the logic flows from the left hand side rail through the Output Y branch and then
through Input B to Output Y at the right hand side rail. Pretty cool…..

Ladder Logic Programming Examples – Ladder hold in logic (Latched)

Once we have triggered the hold in logic using Input A, Output Y will remain latched even if
Input A goes FALSE.

Output Y will remain latched TRUE until Input B goes TRUE. Because Input B is a normally
closed (NC) contact symbol, when it goes TRUE, the logic flow is blocked and Output Y
goes FALSE. Thus releasing the latch.

Remember the NC contact symbol works like a NOT statement, it’s reverse logic….

So, when the scan cycles back again from the top then Output Y, branched across Input A,
also goes FALSE….
Ladder Logic Programming Examples – Ladder hold in logic (Unlatched)

Once Input B returns to the FALSE state we are back at the start, ready to initiate the latch
again.

We can write out the logic expression above as…

IF (INPUT A OR INPUT B) AND NOT (INPUT B) THEN OUTPUT Y.

Hold in logic is great to use because it simplifies your code. It enables us to place all the
conditions that initiate and release latch in the same rung. This makes it easier to read and
troubleshoot.

PLC Motor Control


Ladder logic for motor control can be accomplished using hold in logic. Remember it’s ok to
also call it latching logic.

Simple ladder logic for motor control using push button start stop logic includes a start
button, stop button, motor thermal overload and motor run contactor.

When we wire up the inputs to the PLC the start push button input is wired normally open
(NO). So when the start button is pushed the PLC input changes state from FALSE to
TRUE…

PLC Wiring Basics – Start button

But the stop push button and thermal overload are always wired normally closed (NC). So
when the stop button is pushed it changes from CLOSED to OPEN. In turn the PLC input
changes state from TRUE to FALSE….
PLC Wiring Basics – Stop Button

In fact the rule of thumb is that any device that is required to stop the motor should be wired
normally closed (NC), to make it “fail safe”.

The most common failures are wire break, device failure or PLC input failure.

Wiring the stop push button normally closed (NC) is done because when a failure occurs in
the PLC input circuit it will, more often than not, lead to an open circuit which changes the
state of the PLC input from TRUE to FALSE.

However, if we wire the stop PLC inputs as normally open (NO) and a failure occurs then the
state of the PLC input does not change. It stays FALSE, even if the stop button is pressed,
because there is an open circuit in the connection to the PLC input.

So if there is no change in state, we cannot tell the motor to stop in our ladder logic program.
This is really bad!!!

So for any PLC input that is intended to stop the motor we need to..…

WIRE THE MOTOR STOP SIGNALS NORMALLY CLOSED AND USE A NORMALLY
OPEN SYMBOLS IN THE PLC.

Now that we’ve grasped the concept of the fail safe stop input let’s move on to the motor
control ladder logic programming example.

Motor Control Ladder Diagram

First up let’s list the required inputs and outputs for our motor control ladder diagram.

PLC manufacturers use different memory address allocation so the input output allocations
used here are arbitrary address.

Below is the list of required inputs …..

Next let’s list the required outputs…..


The ladder logic programming example uses the M1 START push button input to activate the
M1 RUN output.

The M1 RUN output is used a second time to latch the M1 RUN output.

Both M1 STOP and M1 TOL are wired normally closed (NC) to the PLC inputs and thus
need to be configured as normally open (NO) symbols in the logic.

So when either stop is activated the logic flow is broken and the latch is reset….

Ladder Logic Programming Examples – Motor Control Ladder Diagram

Remember, we must wire M1 Stop and M1 TOL using normally closed (NC) contacts to the
PLC inputs to make it “fail safe” and for this motor control ladder diagram to work.

If you don’t know what the heck I’m talking about you’ve probably skipped straight to the
motor control ladder diagram. Please….Go back and read the section above to get full bottle
on latching logic…..It’s important!

PLC Wiring Basics


If you are still a little confused about the different PLC wiring and ladder diagram symbol
combinations and their different logic states then….DON’T PANIC!

To help out we’ve developed a nifty table which displays the different combinations of PLC
digital input wiring and ladder logic symbols that can be used.

Further more, it outlines the logic state each of the ladder logic symbols depending on
whether the PLC input is activated or de-activated.
PLC Wiring Basics and Ladder Logic Symbols

In the next section we’ll build on our newly discovered knowledge by exploring the timer
symbol and it’s use in PLC motor control
Ladder Logic Basics
Ladder logic is a programming language that is used to program a PLC (Programmable Logic
Controller). It is a graphical PLC programming language which expresses logic operations with
symbolic notation using ladder diagrams, much like the rails and rungs of a traditional relay
logic circuit. It is used by engineers and electricians to execute logical, sequential, counting,
timing and arithmetic tasks in order to carry industrial automation applications.
In the good ol’ days, machine and process automation was accomplished using a hard wired
control system known as relay logic. With the advent of microprocessors and the invention of
the PLC, relay logic quickly became superseded by programming languages such as ladder
logic.
Because ladder logic was originally designed to replace the use of hard wired relay logic
circuits for machine control the ladder logic programming code actual looks like an electrical
schematic drawing. You might be thinking that ladder logic sounds like an old programming
language. So, with the advancements in software that the world has recently made, is ladder
logic still used?
Ladder logic is definitely still being used in PLC programming. It is the most common method
for programming a PLC. Ladder logic programming is still used today because the core
fundamental logic principles for machine and process control are still the same.
Having said that, the advancements in software have resulted in other PLC programming
languages that compliment ladder logic and vastly improved interface and programming
software has also been developed.
In PLC programming, ladder logic is a programming language that is used for developing logic
expressions in order to automate tasks. Recent advancements in software technology means
that PLC programming using ladder logic has been extended into counting, timing, arithmetic,
sequencers, PID control, data manipulation functions and more. Over the years ladder logic has
developed into the powerful PLC programming language that it is today.
Ladder logic is used extensively for programming PLCs in a multitude of industrial automation
applications. Some examples include….

 Material Handling Conveyor System.


 Pallet Packing and Strapping.
 Ball Mill Lubrication System.
 Logistics Package Conveying and Sorting.
 Cement Batching.
 Beverage Bottling and Labelling.
 Hopper and Tank Level Control.
 Air and Liquid Flow and Pressure Control.

Trying to learn ladder logic basics can be an overwhelming task. If you have some experience
with electric circuits then the PLC programming concepts of ladder logic should be relatively
easy to grasp. Otherwise take comfort in knowing that ladder logic is the quickest and easiest
PLC programming language to learn. In order to help you grasp ladder logic basics we
will….

 Examine the seven basic parts of a ladder diagram.


 Identify the binary and logic concepts used in ladder logic.
 Reveal the hidden ladder logic functions that are automatically built into the structure
of the ladder diagram.
 Discover the five fundamental logic functions that are essential to know.

So let’s begin….

What is a Ladder Diagram?


A ladder diagram is a type of schematic diagram used in industrial automation that represents
logic control circuits. Ladder diagrams are composed of two vertical power rails and horizontal
logic rungs to form what looks like a ladder. The control logic in a ladder diagram is contained
within the rungs.
There are two differences between an electrical schematic and a ladder diagram. The first
difference is the control logic in an electrical schematic is represented using components
whereas in a ladder diagram symbols are used. The second difference is the control logic
execution in an electrical schematic is as per the operation of an electrical circuit whereas in a
ladder diagram it relies on the methodical nature of the PLC scan.

Why is a ladder diagram used for PLC programming?


The reason why ladder diagrams are used for PLC programming is because the early control
system designers were accustomed to relay logic control circuits and ladder diagrams closely
mimic these. They preferred to use ladder diagrams instead using text based programming
languages of the day like C, BASIC, Pascal and FORTRON. The other reason ladder diagrams
are used is because factory maintenance staff already understand how to read relay control
circuits so using ladder diagrams for programming a PLC meant they were easily able to
troubleshooting control system problems.
Ladder diagrams help you to formulate the logic expressions in graphical form that are required
to program a PLC. They represent conditional, input and output expressions as symbols. So
writing a PLC program using ladder diagrams is similar to drawing a relay control circuit.
Ladder diagram (LD) is the official name given in the international PLC programming standard
IEC-61131. But,These days the terms ladder diagram, ladder logic diagram, ladder drawing,
ladder control, ladder circuit, control logic diagram and logic diagram (to name a few) are all
used to describe relay logic circuits and ladder logic programming.
So don’t get too caught up in the specific definition of each of these expressions, they kind of
generally all mean the same thing. At the end of the day most people will know what you are
talking about anyway. Personally, I use the term ladder logic for PLC programming and relay
logic for relay control circuits.
How to Draw Ladder Logic Diagrams
The simple way to describe a ladder diagram is a graphic programming language that uses a
series of rails and rungs containing logic symbols that are combined to form decision making
expressions. Ladder diagrams actually look like a ladder and are more commonly known as
ladder logic programming.
The rails in a ladder diagram represent the supply wires of a relay logic control circuit. There
is a positive voltage supply rail on the left hand side and a zero voltage rail on the right hand
side. In a ladder diagram the logic flow is from the left hand rail to the right hand rail.
The rungs in a ladder diagram represent the wires that connect the components of a relay control
circuit. In a ladder diagram symbols are used to represent the relay components. The symbols
are placed in the rung to form a network of logic expressions.
When implementing a ladder logic program in a PLC there are seven basic parts of a ladder
diagram that critical to know. They are rails, rungs, inputs, outputs, logic expressions, address
notation/tag names and comments. Some of these elements are essential and others are
optional.
To help understand how to draw ladder logic diagrams the seven basic parts of a ladder
diagram are detailed below…..
1. Rails – There are two rails in a ladder diagram which are drawn as vertical lines running
down the far most ends of the page. If they were in a relay logic circuit they would
represent the active and zero volt connections of the power supply where the power
flow goes from the left hand side to the right hand side.
2. Rungs – The rungs are drawn as horizontal lines and connect the rails to the logic
expressions. If they were in a relay logic circuit they would represent the wires that
connect the power supply to the switching and relay components.
3. Inputs – The inputs are external control actions such as a push button being pressed or
a limit switch being triggered. The inputs are actually hardwired to the PLC terminals
and represented in the ladder diagram by a normally open (NO) or normally closed
(NC) contact symbol.
4. Outputs – The outputs are external devices that being are turned on and off such as an
electric motor or a solenoid valve. The outputs are also hardwired to the PLC terminals
and are represented in the ladder diagram by a relay coil symbol.
5. Logic Expressions – The logic expressions are used in combination with the inputs and
outputs to formulate the desired control operations.
6. Address Notation & Tag Names – The address notation describes the input, output and
logic expression memory addressing structure of the PLC. The tag names are the
descriptions allocated to the addresses.
7. Comments – Last but by not least, the comments are an extremely important part of a
ladder diagram. Comments are displayed at the start of each rung and are used to
describe the logical expressions and control operations that the rung, or groups of rungs,
are executing. Understanding ladder diagrams is made a lot easier by using comments.
Parts of a Ladder Logic Diagram

How to Read Ladder Logic


Microprocessors like the ones found in PLC’s and personal computers operate on the binary
concept.
You’ve probably heard of the term ‘binary’. It refers to the principle that things can be thought
of in one of two states. The states can be defined as :

1 or 0

True or False

On or Off
High or Low
Yes or No
Microprocessors
love binary…..10101011101000111010001010100010100100101010010011.
I don’t know about you, but my head hurts just looking at that.
Luckily ladder logic uses symbolic expressions and a graphical editor for writing and reading
ladder diagrams making it easier for us mere humans to comprehend. If we translate a real
world event into ladder logic we can express it symbolically in the form of a normally open
(NO) contact. This event could be something like a button being pushed or a limit switch being
activated.
Let’s call it event ‘A’. It follows the binary concept and has one of two states, TRUE or FALSE.
The event associated with the normally open (NO) contact can be TRUE or FALSE. When that
event is TRUE then it is highlighted green and the logic flow can move past it to the next logic
expression. Just like the current flow in an electric circuit when a switch is turned on.
The ladder logic truth table for a normally open (NO) contact which denotes event ‘A’ is shown
below….

Ladder Logic Truth Table – Normally Open (NO) Contact

A normally open (NO) contact alone cannot decide what action to take to automate
something, it merely tells us in what state the event is.

We need binary’s best friend ‘logic’ to help out.

Logic is the ability to decide what action needs to be taken depending on the state of one or
more events.

We use the binary and logic concepts every day in our own lives. For example, if I feel cold
then I put my sweater on, but if I fell hot then I take my sweater off.

Binary concept – Cold or Hot, Sweater On or Sweater Off.

Logic concept – IF, THEN logic functions.

Binary logic in action!


The binary and logic concepts are what makes ladder logic work. The hidden key to
unlock your understanding of how ladder logic works is that the IF, THEN logic
functions are automatically built into the structure of the ladder diagram.

Ladder Logic Functions


Let’s take a real world event, allocate it to a normally closed (NC) contact and call it ‘A’. In
ladder logic the real world events are defined as PLC inputs.

Now, let’s call the result of the logic function ‘Y’. In ladder logic the result of a rung logic
function is defined as a PLC output.

When we take these two fundamental elements and insert them into a rung in a ladder
diagram we get your first line of code!

It’s equivalent to “Hello World” in other programming languages…..

Ladder Logic Basics – Hello World

Now, let’s expose the hidden inbuilt functions by highlighting them in blue in order to
illustrate the relationship between the ladder diagram rung structure and it’s inbuilt IF, THEN
functions….

Reading Ladder Logic Diagrams – In Built Functions

We can write out the logic expression in the above as rung as IF A THEN Y.

Because PLC input A follows the binary concept it has two possible states, TRUE or FALSE.

Therefore it results in two possible logic iterations:

IF A = FALSE THEN Y = FALSE

IF A = TRUE THEN Y = TRUE

We also can express this in a truth table….


Truth Table

If we translate this into a ladder logic diagram we express it symbolically in the form of a
normally open (NO) contact for the input and a relay coil for the output. Remember the logic
flow is from left to right and follows the same concept of current flow in an electric circuit.

The ladder logic truth table is shown below….

Ladder Logic Basics Truth Table – Hello World

In order to fast track our understanding ladder logic there are three more fundamental logic
functions that are essential to know.

You may be surprised, but when we combine these three functions with IF, THEN we will be
able to program the majority of automation control requirements.

The three functions are:

1. NOT
2. AND
3. OR

Ladder Logic NOT Function

The result of the NOT function is basically the opposite state of an event that occurs.

So if PLC input A is FALSE the result will be TRUE. And vise versa when PLC input A is
TRUE the result will be FALSE.

The NOT Function is sometimes referred to as reverse logic. Check out the truth table
below….
Truth Table – NOT Function

If we translate a NOT function into a ladder logic diagram we express it symbolically in the
form of a normally closed (NC) contact.

The ladder logic truth table is shown below….

Ladder Logic Basics Truth Table – NOT Function

Ladder Logic AND Function

The AND function examines multiple PLC inputs and has one resulting output.

If we translate an AND function into a ladder diagram we can express it symbolically in the
form of two normally open (NO) contacts (PLC inputs A and B) and a relay coil (PLC output
Y).

They are all connected in line, just like a series connection in an electric circuit.

Ladder Logic Basics – AND Function

This time we have also highlighted the hidden AND function to illustrate the relationship
between the ladder logic functions and the ladder diagram rung structure.

We can write out the logic expression above as IF A AND B THEN Y.

The AND function examines if all the PLC inputs are TRUE, then the corresponding result is
also TRUE. However if any one of the PLC inputs is FALSE then the corresponding result is
also FALSE.
Because PLC input A and B follows the binary concept and are part of the AND function
there are four possible logic iterations.

Check out the truth table below….

Truth Table – AND Function

The number of logic iterations increases with the number of PLC inputs (2PLC Inputs). But that
doesn’t matter too much with the AND function because the result can only be TRUE if all the
PLC inputs are TRUE.
If we translate an AND function into a ladder logic truth table we get the table below….

Ladder Logic Basics Truth Table – AND Function

Ladder Logic OR Function

The OR function examines multiple PLC inputs and has one resulting output.
If we translate an OR function into a ladder diagram we can express it symbolically in the form
of two normally open (NO) contacts (PLC inputs A and B) and a relay coil (PLC output Y).
The inputs are placed in the rung in what is known as a branch. This is the equivalent of a
parallel connection in an electric circuit.

The output is then connected in line with the rung….

Ladder Logic Basics – OR Function

This time we have also highlighted the hidden OR function when we create a branch (parallel
connection) with PLC input B across PLC input A.
We can write out the logic expression above as IF A OR B THEN Y.
The OR function examines if any of the PLC inputs are TRUE, then the corresponding result
is also TRUE. However, all the PLC inputs must be FALSE in order for the corresponding
result is also be FALSE.
Because PLC input A and B follows the binary concept and are part of the OR function there
are four possible logic iterations.

Truth Table – OR Function

Remember, the number of logic iterations increases with the number of PLC inputs (2PLC
Inputs
). But that doesn’t matter too much with the OR function because the result can be TRUE
if any of the PLC inputs are TRUE.

If we translate an OR function into a ladder logic truth table we get the table below….
Ladder Logic Basics Truth Table – OR Function

Well done! You now have a handle on the basics of ladder logic.

In the next section we will jump straight into the most common symbols that you can’t do
without when ladder logic programming. We’ll also examine their operation and outline
some of their most popular uses.

You might also like