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:
Single Push Button On/Off
Ladder Logic
This function is also called push on push off logic sometimes even flipflop 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):
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 Haldankars 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 Logic Examples with
Timers
PLC program examples with timers in ladder logic. Generally speaking, you
have three types of timers available in ladder logic. The on-delay timer, the
off-delay timer and the retentive timer.
PLC Program Example with On
Delay Timer
The first type of timer in ladder logic is the on delay timer. Its name comes
from the fact, that the on delay timer delays its output from the on signal.
As soon as the on delay timer gets a signal at the input, the timer starts to
count down. When the preset time is up, the output of the on delay timer
will turn on. If the input is turned off before the count down finish, the time
will reset.
On delay timers in ladder logic can look different depending on the
PLC programming software. But common for all of them are the following:
Input
Enable Output (EN)
Done Output (DN)
Preset Time Value
The enable output (EN) is the first output and it is on when the timer
is energized. So, as long as the input is true or on, the enable output
will be true.
Second output is the done output (DN). This output in an on delay
timer is only on, when the timer has counted down the preset time.
Look at this great video for more info about the on delay timer. The
software used is the free RSLogic Micro Starter Lite from Allen
Bradley.