GE / IP FANUC Series 90/30 In Stock

World's Largest Warehouse

of GE 90-30, Genius, and RX7i

Mon-Fri 8AM-5PM EST

Function Block Diagram – What Is It?

What is a Function Block Diagram?

A Function Block Diagram (FBD) is a step-by-step graphical representation of the elements of a complex system that helps simplify the working of the system, thereby creating a better understanding and interpretation of such systems. It makes use of functional blocks to describe the functions and relationships between different elements in a given system. The input variables and outputs of the FBD functional blocks are illustrated using connecting lines.

Function Block Diagrams are widely used in the Systems Engineering field for logic or control configuration of various programmable control systems such as Distributed Control Systems (DCS) and Programmable Logic Controllers (PLCs).

Function Block Diagrams in PLC Programming

The International Electrotechnical Commission (IEC) introduced Function Block Diagram as an IEC 61131-3 standard graphical PLC programming language to overcome the challenges associated with Ladder Diagram (LD) and textual PLC programming using Structured Text (ST or STX) and Instruction List (IL) languages. In essence, a Function Block Diagram can replace a textual PLC program that has thousands of lines of code, by just assembling and connecting several function blocks. And as the saying goes “A picture is worth a thousand words”, visual programming using FBDs is an intuitive method of describing the functionality and behavior of a complex control process.

In PLC programming, a Function Block Diagram can be defined as a network primarily consisting of functions (sets of elementary blocks) and function blocks that are interconnected to express complex behavioral logic of process control. FBD functions describe the relationship between the input and output parameters connected to the function blocks using connection lines.

Function blocks were developed to allow the reuse of common control tasks such as timers, counters, and Proportional-Integral-Derivative (PID) controllers at different sections of a control program or in different control systems. A functional block is simply a packaged element of programming software that details the attributes of a data structure and the behavior of a set of output and input variables.

FBD programming enables PLC users to create complex programs by taking pre-programmed function blocks and functions from the IEC-61131-3 compliant library and connecting them to a programming terminal. The resulting instruction blocks (or rather PLC programs) can then execute a particular control process based on conditional logic. Essentially, FBD-based PLC programs are commonly used to visually depict signal and data flows through graphical blocks, which are reusable elements of the PLC programming software being used.

Fundamentals of Function Block Diagrams

Function Block Diagrams consist of functions that are put into functional blocks. These blocks also include conversions, and one or more input and output variables. Each FBD program makes use of its functions, conversions, and function blocks to determine the appropriate outputs according to the values of the inputs.

A function is defined as a program’s instruction unit, which when executed to a specific set of input parameters, yields one primary output and it doesn’t include any internal memory storage. Functions express the relation between the state of the input parameters and output variables of a function block. Oftentimes, FBD functions are mistaken for function blocks which include multiple outputs and internal storage.

Examples of functions used in Function Block Diagrams include:

  • String Handling Functions
  • Arithmetic Functions such as add, subtract, and multiply
  • Trigonometric Functions like cosine (cos), tangent (tan), sine (sin), and cosecant (csc)
  • Logic Functions such as “AND”, “NAND”, “OR”, “NOR”, and “EXCLUSIVE OR”.

On the other hand, examples of FBD function blocks are PID controllers, timers, and counters.

An FBD functional block is normally illustrated as a rectangular box with one or more inputs getting in on the left side and an output exiting from the right side, as shown below. This box contains a symbol or text in the middle that indicates the actual functionality of the block; the symbol represents the function associated with that particular function block. In many ways, FBD function blocks are theoretically comparable to integrated circuits used within electronic devices.

Depending on the type of function, an FBD function block can have multiple inputs and outputs. These inputs and outputs can then be connected systematically with the inputs and outputs of another function block to construct an FBD program. That means the output of one function block can become the input of another function block. Thus, establishing the relation between the output of one function in a given function block and the input of another in the next function block helps create a Function Block Diagram, as illustrated below.

It is important to note that, unlike textual PLC programming, FBD programming doesn’t require variables to transfer data from a specific subroutine to the next, since the connection wires between different FBD functional blocks naturally encapsulate and transmit the data. As a result, a Function Block Diagram is not only used to describe the attributes of functional blocks in FBD-based PLC programs, but it can also be used to explain transitions, steps, and actions within PLC programs written using Sequential Function Chart (SFC) programming language.

The IEC-61131-3 compliant library provides numerous standard FBD functional blocks with a wide range of functions from very basic arithmetic functions to advanced logic functions. However, when developing PLC programs using FBD programming language, users are at liberty to customize the standard function blocks or make their own. Also, the IEC-61131-3 compliant function blocks can include standard functions, like those of timers, PID controllers, counters, or logic gates, or have user-defined functions, such as a function for obtaining the average value of the inputs of a specific function block. This makes FBD-based PLC programs extremely versatile because you can create a function block specific to one function i.e. controlling a motor or valve, and use it several times.

Use of Logic Gates in Function Block Diagrams

Logic Gates are standard FBD function blocks available in the IEC-61131-3 compliant library. They are very popular in PLC programming using Function Block Diagrams because logic is the primary function of any PLC program. In Function Block Diagrams, Logic Gates are usually represented using standard circuit symbols of two forms: (i) ANSI System that makes use of American-Standard logic gate symbols; (ii) IEC International Standard that makes use of a rectangular box with the type of logic function indicated inside the box.

For the IEC international standard, a logic gate symbol with a “1” inside the rectangular box indicates that an output is available whenever the value of the input is 1. The “OR” logic function is represented by “ ≥ 1”, indicating that an output is available if the input value is equal to or greater than 1. Other common logic functions are the “AND” logic function represented by “&” and the “EXCLUSIVE OR” logic function given by “= 1”. With the “OR” and “AND” logic functions, you can derive lots of other logic functions i.e., using negated function block inputs and outputs.

Negation logic operations allow users to invert either the input or output of an FBD function block. A negated logic input is indicated by a small circle on the block’s input point, while a negative logic output is represented by a small circle on the block’s output point, as illustrated in the figure above.

Note: Function Block Diagrams can be constructed using logic gate symbols of the IEC or ANSI form.

How Do You Construct a Function Block Diagram?

IEC 61131-3 provides a standard framework for drawing function blocks for use in developing FBD-based PLC programs. As discussed in the section above, an IEC-standard functional logic gate block is depicted as a rectangular box with one or more inputs entering on the left side and outputs exiting from the right side. The name/symbol of the associated logic function is shown inside the box, for example, “AND” or “&”, while the label of the FBD function block is indicated above the rectangular box, such as Timer 1. The names of the input and output parameters are indicated at the appropriate I/O points within the logic gate functional block.

In cases where graphical connection lines may be difficult to draw without complicating the Function Block Diagram, cross-diagram connectors are applied. These connectors can also be used to indicate a situation where an output from one functional logic gate block is used as an input of another block, thereby creating a feedback loop.

The figure below shows how cross-diagram connectors are used to simplify and complete Function Block Diagrams with feedback loops. In the figure, a Ladder Diagram PLC program is converted into an FBD-based PLC program using IEC and ANSI logic gate symbols indicating different logic functions.

Example of PLC Programming with Function Block Diagram

To illustrate how Function Block Diagrams are used to program PLCs, let’s consider the development of a Ladder Diagram and an FBD program to control a dosing pump using a PLC control system. The dosing pump needs to be activated by closing a Normally Open (NO) Start Switch, to add a Caustic Chemical (in liquid form) into a water storage tank.

At the beginning of the control process, the Caustic level in the water tank is below the minimum required level, but the Caustic reservoir contains enough amount for pumping into the water tank. Therefore, an “AND” logic operation is required between the Start Switch and the Input Sensor that’s ON whenever the Caustic level in the water tank is below the required amount.

Once the pump is activated, another switch should remain ON until the Caustic liquid being pumped into the water tank reaches the required level. This should be a Normally Closed contact switch in the Ladder Diagram and a negated input in the Function Block Diagram. Also, another Normally Open contact switch should be included in the “AND” logic operation to indicate the availability of Caustic chemicals in the reservoir.

Therefore, the resulting Ladder Diagram PLC program will include three inputs:

  • A Normally Open Start Switch
  • A Normally Closed Caustic Level Switch
  • A Normally Open Reservoir Switch, and one output – the command signal for activating the dosing pump.

While the FBD program will include an “AND” functional logic gate block with three inputs (the Start Switch input, Caustic Level sensor input, and the Reservoir Switch Input), and one output to the dosing pump.

How are Function Block Diagrams Executed?

As discussed previously, Function Block Diagrams are comprised of interconnected functions and function block components that describe the behavioral logic of a complex control system. Also, a signal in a Function Block Diagram is considered to flow from the output of one function in a given functional block to the input of another function in the next functional block. And as mentioned earlier, inputs get into an FBD function block from the left side while outputs exit on the right side. Hence, FBD networks are executed from left to right.

In addition, an FBD function block is only executed when all of its inputs are available, making FBD programs ideal for continuous control behavior. Whenever an FBD functional block is executed, it analyzes its internal variables as well as all of its inputs and outputs. When executing, the FBD algorithm generates new values for the internal and output function block variables.

Therefore, the outputs of an FBD network are updated based on function block evaluations. Also, changes in output variables and signal states propagate automatically from left to right across the Function Block Diagram. For FBD networks with a feedback loop, a signal can be fed back from the output of a particular function block, after the network is evaluated, to the input of the preceding function block to be used as the starting input value during the next execution of the FBD network.

Note: While Function Block Diagrams are very easy to understand and interpret, creating a large FBD-based PLC program using special control functions and I/O may not be ideal due to the amount of screen space required, and the need for more upfront coding preparation as it may be more difficult to make corrections thereafter. Hence, FBD programming is best suited for simpler PLC programs such as those requiring the use of standard functional logic gate blocks.

This entry was posted on December 27th, 2022 and is filed under Uncategorized. Both comments and pings are currently closed.

Comments are closed.

PDF Supply sells used surplus products. PDF Supply is not an authorized distributor, affiliate, or representative for the brands we carry. Products sold by PDF Supply come with PDF Supply’s 1-year, 2-year, or 3-year warranty and do not come with the original manufacturer’s warranty. Designated trademarks, brand names and brands appearing herein are the property of their respective owners. This website is not sanctioned or approved by any manufacturer or tradename listed.

Rockwell Disclaimer: The product is used surplus. PDF Supply is not an authorized surplus dealer or affiliate for the Manufacturer of this product. The product may have older date codes or be an older series than that available direct from the factory or authorized dealers. Because PDF Supply is not an authorized distributor of this product, the Original Manufacturer’s warranty does not apply. While many Allen-Bradley PLC products will have firmware already installed, PDF Supply makes no representation as to whether a PLC product will or will not have firmware and, if it does have firmware, whether the firmware is the revision level that you need for your application. PDF Supply also makes no representations as to your ability or right to download or otherwise obtain firmware for the product from Rockwell, its distributors, or any other source. PDF Supply also makes no representations as to your right to install any such firmware on the product. PDF Supply will not obtain or supply firmware on your behalf. It is your obligation to comply with the terms of any End-User License Agreement or similar document related to obtaining or installing firmware.