Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Ladder Logic Examples and PLC Programming Examples

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Ladder Logic Examples and

PLC Programming
Examples
Why Use PLC Ladder Logic
Examples?
The reason I use ladder logic examples is one of the big advantages of code. In this
case the PLC programming language ladder logic. You can reuse chunks of a PLC
program in your own PLC program. In fact reusable code is widely used and many
automation projects are build on the ISA-88 or S88 batch control standard which
encourages reusable function blocks. Reusing code can also have advantages when
you’re integrating a SCADA system.

You can “copy and paste” lines of ladder logic symbols from one PLC program to
another PLC program. By doing so, you will shorten the development time of a project.
So that you don’t have to invent everything from the very bottom each time you are
developing a new PLC program. That is why I often make use of PLC program
examples.

I wrote another article where I included examples of PLC analog input and output
programming. If you want to learn ladder logic from the beginning, you should check out
my ladder logic tutorial or maybe even start learning from an online PLC training course.
Simple Ladder Logic Program
Examples
Ladder diagram examples and solutions to simple PLC logic functions. These are
all basic PLC functions implemented in ladder logic. 

Simple Start/Stop Ladder Logic Relay


This is how the ladder diagram looks for a simple start/stop function. The function can
be used to start and stop anything like a motor start/stop.

Ladder Logic Examples and


Example PLC Programs
Click on the type of PLC program example you want to see, or scroll down to see the
all:

 Simple Ladder Logic Program Examples


o Simple Start/Stop Ladder Logic Relay
o Single Push Button On/Off Ladder Logic
 Ladder Logic Examples with Timers
o PLC Program Example with On Delay Timer
o PLC Program Example with Off Delay Timer
o PLC Program Example with Retentive Timer
 Ladder Diagram for Motor Control
o Star Delta PLC Ladder Diagram
o Ladder Diagram for DOL Motor Starter
 PLC Program Examples From The Real World
o Traffic Light Ladder Logic Diagram
o Ladder Diagram for Bottle Filling Plant
o PLC Ladder Diagram for Elevator Control
Simple Ladder Logic Program
Examples
Ladder diagram examples and solutions to simple PLC logic functions. These are
all basic PLC functions implemented in ladder logic. 

Simple Start/Stop Ladder Logic Relay


This is how the ladder diagram looks for a simple start/stop function. The function can
be used to start and stop anything like a motor start/stop.

In this ladder logic example, there are two inputs.

1. “Start button” or PLC input I0.0.


2. “Stop button” or PLC input I0.1.

The start button will activate the relay, or ladder logic relay M10.0. When the start button
is released, the relay will still be activated, because of the latch in ladder rung 2. This
latching will be broken when the stop button is activated.

You might wonder why the stop button in this example is normally open. And the
reason for that, is that you should use normally closed as stop button, to avoid
dangerous situations under failure.

Here is what the PLC program example looks like:


Simple ladder logic examples of start/stop of relay.

Single Push Button On/Off Ladder Logic


This function is also called push on push off logic sometimes even flip-flop or toggle
function. It is the same function as the on/off button on your computer or mobile phone.
When you push the button the first time, the output will be activated. Now, when you
push the button for the second time, the output will deactivate and turn off. The single
push button has two functions: on and off.

Push on push off logic can be done in several ways. It can be done by using ladder
logic and boolean logic instructions or it can be done with a counter. It can even be
done with PLC rising edge and falling edge triggers or with shift registers.

Here is the example using boolean logic instructions only (complicated version):


Single push button ON/OFF ladder logic example. Also known as “push to on, push to off” logic function.
This example is from the PLC, Scada, DCS blog. The blog has a lot of very useful
information about PLC programming and especially ladder logic. Take a look at the blog
and see the many ladder logic examples.

But… there is a faster way to make the same toggle function with a single push button:

The example is from Mayur Haldankar’s blog about PLC programming and DSP (digital
signal processing). He even has examples of DSP programs written in C++.

In his example, he uses 3 (4) rungs only to make the toggle function of a push button
(simple version):

Ladder toggle or flip-flop function (single push button on/off).

Ladder Logic Examples with


Timers
PLC program examples with timers in ladder logic.

Generally speaking, you have three types of PLC timers available in ladder logic.
The on-delay timer, the off-delay timer and the retentive timer or pulse timer.

You might also like