What is the Difference between Ladder Logic and Function Block Diagrams?In this video and article, you will learn the difference between ladder logic and function block diagrams.
Today you will learn the difference between ladder logic and function block diagrams. Specifically what they are and when do we use them when programming PLCs.
If you have found this blog post, chances are you have heard of either ladder logic, function block diagrams, or both. Ladder logic has been the industry standard for decades of PLC programming. In case you missed it, check out the RealPars video, “What is Ladder Logic”?
Most PLC manufacturers around the world still support ladder logic programming. However, some have been moving towards function block programming.
Let’s take a look at some of the similarities and differences.
Ladder logic is pretty well “the universal programming language” of PLCs. As I mentioned earlier it has been around for decades and is pretty well understood by most technicians and engineers alike.
It is named “Ladder Logic” because it quite literally looks like a ladder. The vertical lines are referred to as the “power rails”.
The horizontal lines that our programming bits are located on are rungs, just like on a ladder.
Ladder Logic is read from top to bottom and left to right.
Function block diagrams can essentially convert several lines of ladder logic into boxes.
If you missed it, check out the RealPars video “What is a Control or Function Block”?
In the middle of the function block will be a symbol or text, labeling the function block. This will describe the actual function of the block.
There can be one or several inputs and an output for each function block. Those function blocks can be inputs to other function blocks as well.
Just like ladder logic, function block diagrams should be read left to right, top to bottom.
In a sense, this format can make it easier for a technician troubleshooting a machine see what is happening to the machine.
Now, we will discuss a few basic logic function blocks and their ladder counterparts. Let’s look at an “AND” function block first.
If you are unfamiliar with “AND” Logic, it is actually pretty simple. Basically, you need at least two inputs energized to turn on or energize its output. I like to think of it as you need both inputs (input 1 and input 2) to turn on the output.
In ladder logic, “AND” logic would look like a series circuit as you can see in the following picture. In a function block diagram, the entire rung is replaced by one box or block.
Many industrial machines use “AND” logic. A large metal Press Brake uses “AND” logic for its controls.
The operator must push two buttons at the same time. This energizes the output of the “AND” logic. This allows the cylinders to be activated and bend the metal.
Another common function used is the “OR” logic function block.
With an “OR” function block, you would energize its “input 1”, or, “input 2” to energize the output.
In ladder logic, “OR” logic would look like a parallel circuit like the below picture.
Machines may use “OR” logic when there are more than one set of controls to operate the machine.
Conveyor belts can utilize this programming. They will commonly have the “Start” and “Stop” buttons located near the conveyor.
They can also have a start and stop button at another location in order to start the conveyor remotely.
These were just two simple examples of function block programming compared with ladder logic. A complete function block diagram will utilize many more “function blocks” and possibly even combinations of several blocks.
I first encountered function block diagrams working in a tire manufacturing plant about 12 years ago. Once I became familiar with the style, found it easier to follow and troubleshoot the machines. Hopefully, you will too.
Let’s take a look at what we now know. Ladder logic has been around for a long time and has been the universal programming language for PLCs.
Function block programming has been steadily gaining popularity in the PLC industry over the past decade or so. Several manufacturers offer both programming options in their PLCs.
Essentially, a single function block can take the place of an entire line of ladder logic. These blocks can be strung together to complete an entire program. Like ladder logic, function block diagrams are read left to right, top to bottom.
We compared “AND” and “OR” logic function blocks with their ladder logic counterpart. Hopefully, you now have a firm grasp of their similarities and differences.
I truly hope this blog post helped you understand the differences between ladder logic and function block diagrams.
Thanks again for reading. Check back soon for more RealPars articles, leave your questions and comments and we’ll chat with you soon!
In this blog post, you’ll learn about the mindset that helped me getting a PLC programming job with NO experience. This is my personal experience as someone who searched for a job in this field and as an employer who reviews resumes and interviews candidates for a variety of projects. So let’s get started!
Siemens has made their TIA-Portal version 16 available at a reduced price for a period of time. In this article, we will show you how to: - Purchase the TIA Portal version 16 software, - Download and install the software, and - Install the software license so that it...
A control valve is a power-operated device used to regulate or manipulate the flow of fluids, such as gas, oil, water, and steam. It is a critical part of a control loop and is an example of a final control element. The Control Valve is by far the most common final...
Learn how to program PLCs, install and wire industrial devices, and at the same time purchase them online.
+31 10 316 6400
Mon - Fri 8:30 am to 5:30 pm (CET)
Rotterdam Science Tower, Marconistraat 16,
3029AK Rotterdam, Netherlands
© 2020 RealPars B.V. All rights reserved.
Created with coffee and tea in Rotterdam.