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. This is like the opposite of “AND” logic.
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!
5 ACTIONABLE TIPS FOR GETTING A PLC PROGRAMMING JOB WITH NO EXPERIENCE The mindset that helped me find my ideal job as a PLC programmer with NO experience. Working as a PLC Programmer is one of the most attractive and highest paying jobs in the engineering industry....
In this article, we are going to discuss the international rating system that classifies devices for different environmental conditions. That rating system is called the Ingress Protection or IP rating as it is commonly referred to. Electrical devices are found all...
In this article, you will learn about PID Tuning Parameters through a few practical examples. PID is an acronym for Proportional, Integral, and Derivative. A PID controller is a device that is used to control a process. The controller can be a physical, stand-alone...
RealPars is the world's largest online learning platform for automation engineers.
+31 10 316 6400
Mon - Fri 8:30 am to 5:30 pm (CET)
Rotterdam Science Tower, Marconistraat 16,
3029 AK Rotterdam, The Netherlands
© 2019 RealPras B.V. All rights reserved.
This project is approved and supported by The Netherlands Enterprise Agency