Functional Block Diagram

 

Functional-Block-Diagram-In-PLC, Function-Block-Diagram

26 March, 2023.

In this post, we will see the concept of functional block diagram in PLC.

PLC programming consists of five languages – ladder logic, structured text, functional block diagram, instruction list and sequential flow chart. This is according to IEC 61131-3 syntax. Programmers mostly go with ladder logic when they start programming for first time, because it is very easy to learn and interpret. If one understands ladder logic, then he must be knowing that when number of rungs start to increase in a particular section, the programmer starts to feel irritated when he views the system online. This is because suppose there are 100 rungs written for a certain logic and you have taken the PLC online to view the logic in animation; when he starts scrolling downwards or upwards, he finds that the scrolling rate starts to lag many a times when viewing online. In this case, if a fast condition has arisen and then went in the logic, the programmer will not be able to identify what happened in the logic and how to troubleshoot then. The scrolling rate when viewing online, continuous scrolling up-down takes a lot of efforts from a programmer to troubleshoot a logic. For this reason, a very feasible language has been provided to overcome this issue. That language is – functional block diagram. In this post, we will see the concept of functional block diagram in PLC.

·        FBD PLC Programming:


Functional block diagram, as discussed earlier, is a type of PLC programming language. As the name implies, it can be viewed as a block of elements placed anywhere in a section. Simply, suppose you are given a drawing paper. In that, you are asked to draw some elements according to your requirement. Then, you will place your elements wherever required, according to your needs. In that single paper, you can then view your whole drawing. This logic similarly applies to a functional block diagram. In this, you have logical boxes, with inputs and outputs. According to your program, suppose if you want to place five blocks in a section. You will then place the blocks wherever required in a page, link them with inputs and outputs; and thus, a logic has been created. The block is the building element, which has it’s respective logic written inside it. You simply have to link the boxes with each other. Ultimately, when you finally see the program, you will find that a complete block diagram of programs have thus been created. Each block has a text written in it; which describes it’s name and the description of block.

It helps in the sense that you can easily understand the relationship between variables, blocks and processes. By arrows, links and points, you can easily see how a logic is flowing and working. This helps the PLC programmers in troubleshooting a system very easily.

PLC FBD Programming Examples:

It is always easy to understand theories with good examples. So, here in this case, we will understand functional block diagram in a PCL more flexibly, by referring at least two examples. There are many types of function blocks in a PLC and it would rather become cumbersome to explain all of them; but we will see how to interpret and convert a logical query into functional block diagram.

Let us start with the first example. The query is – Press start push button (NO) and with stop push button in NC state, a lamp should turn on. When the lamp turns on, a timer should start and after that timer, another lamp would turn on; and on pressing stop button, both the lamps will turn off immediately. Now, to understand how to write this logic in function block diagram, just interpret the words written. You will find that basic words like and, or have been used. This means that you have been clearly instructed what to do; which will thus help you in finding the same blocks in FBD language. Refer the below image for understanding.

FBD-Programming-Example, How-To-Write-FBD


Now, in the image, you can see that I have used three function blocks – AND, SR (Set Reset) and TON (On Timer). Remaining are the variables and links used. If you see clearly, you will find that I have easily drawn a logic which was asked to be made by just translating the sentence into logic. Press start push button (NO) and with stop push button in NC state, a lamp should turn on – Used AND block and linked two variables with it naming start and stop with their respective states of NO and NC. Then, the output of that AND block was linked to a block of SR [SR block was used here, because the push buttons will be momentary in nature and you have to latch, unlatch a logic through it]. Then, the output of SR block was linked to a variable named lamp1. When the lamp turns on, a timer should start and after that timer, another lamp would turn on; and on pressing stop button, both the lamps will turn off immediately – Used TON block after the SR block to turn on the second lamp after a timing delay. Then, linked stop push button to the reset pin of SR block [When the output of SR block goes off, then both the lamps will turn off through this].


 Let us go ahead with the second example. The query is (in continuation with the first example) – When lamp2 turns on, lamp3 will turn on after some delay. When lamp3 turns on, the total system will stop after a delay. On pressing stop button, all the lamps will turn off immediately. Refer the below image for understanding the logic written.

FBD-PLC=Programming, How-To-Write-Function-Block-Diagram-In-PLC

Now, in the image, you can see that I have used two more function blocks of TON (On Timer). Remaining are the variables and links used. If you see clearly, you will find that I have easily drawn a logic which was asked to be made by just translating the sentence into logic. When lamp2 turns on, lamp3 will turn on after some delay. When lamp3 turns on, the total system will stop after a delay. – Used TON block and linked the output of first timer with the input of second timer. Then, again used TON block and linked the output of second timer with the input of third timer. Then, the output of third timer was linked to an OR block. On pressing stop button, all the lamps will turn off immediately - Used OR block to turn off the system. This is because if you read the whole query now, you will find that the system is stopping by either pressing stop button or when the lamp3 turned on, which then triggers one more timer to stop the logic.

By understanding both the examples, you can find that how easily the variables and blocks are linked together to form one single logic. Also, you can view this whole logic in one window and when you go online, it will help you more easily to troubleshoot. Functional block diagram is thus made by linking variables and blocks with each other; and naming the blocks properly as shown in both the images. Also, as you can use derived (user-defined) function blocks in a PLC, it will then allow more flexibility to the programmer to design the system more efficiently. There are numerous types of blocks in a PLC; you just need to understand the function of each block and then design the logic accordingly.

I have covered the general principle of functional block diagram. I have also not attempted to cover every theory of these design deeply; you can learn it easily once you get familiar with them. I have just given you an insight of these types of controls. A great software and logic understanding is required by the engineer who is designing such system. Learn the basics and explore a new type of study in this type of automation.

Thank you guys; I hope you enjoyed reading the practices normally used for this type of study in industrial automation.


 


Comments