What is FBD?

FBD (Function Block Diagram) is a graphical programming language from the IEC 61131-3 standard in which control logic is drawn as a network of function blocks, with signals flowing along connection lines from the output of one block to the input of the next. The program therefore reads like a signal diagram: measured values enter on the left and control signals leave on the right. FBD is widely used on PLCs and DCS platforms in process automation, industrial automation and other industrial control systems, especially for continuous control, analogue signal processing and interlocks.


๐Ÿง  How does a Function Block Diagram work?

An FBD program consists of one or more networks. Each network contains blocks with inputs on the left and outputs on the right. The building elements are:

  • Blocks - standard functions (add, compare, limit), standard function blocks (timers, counters) or user-defined blocks
  • Connection lines - directed lines from left to right that pass a value on; both ends must have the same data type
  • Branches - one output may feed several inputs, for example a measured temperature that goes both to a controller and to an alarm comparison
  • Variables - inputs and outputs are mapped to sensors, actuators, internal variables or setpoints

The PLC executes the program cyclically: read inputs, evaluate all networks, write outputs, start again. Within a network the wiring determines the order: a block is evaluated only after the blocks feeding its inputs have been evaluated. For blocks that are not wired together no order is required; the engineering tool chooses one.

A feedback path (an output that is used again as an input further upstream) forms a loop with no logical starting point. The engineering tool then asks you to mark one connection as the feedback wire; in Rockwell Studio 5000 this is called Assume Data Available. That block then uses the value from the previous scan. Forget this, or mark the wrong wire, and the logic runs one cycle behind.


๐Ÿ”ง What is the difference between a function and a function block?

IEC 61131-3 makes a sharp distinction that is directly visible in FBD:

Property Function Function block
Memory None: the same inputs always give the same output Yes: keeps internal state between scans
Instance Not needed Every call has its own declared instance
Standard examples ADD, MUL, SQRT, GT, EQ, MIN, MAX, LIMIT, SEL, AND, OR, NOT TON, TOF, TP (timers), CTU, CTD, CTUD (counters), R_TRIG, F_TRIG (edge detection), SR, RS (bistables)
Typical use Calculation, comparison, limiting Delay, counting, controller, motor or valve control

A PID controller is therefore always a function block, because it must remember the integral sum and the previous error. The standard itself contains no PID block: vendors supply one in their libraries, such as PID_Compact in Siemens TIA Portal or PIDE in Rockwell Studio 5000. The same applies to blocks for scaling, filtering or averaging, which have different names per vendor and sometimes behave differently.

User-defined function blocks are what make FBD powerful. A standard block for a motor, valve or analogue measurement with alarm limits is designed and tested once, then instantiated hundreds of times. The result is consistent logic, faster engineering and easier maintenance.


๐Ÿ•ฐ๏ธ Where does FBD fit in IEC 61131-3?

IEC 61131-3 was first published in December 1993 and standardised the programming languages for PLCs. The third edition (2013) deprecated Instruction List; the fourth edition, published in May 2025, removed IL altogether. The current languages are:

Language Form Strong at
Ladder Logic (LD) Graphical, relay diagram Discrete logic, machine control
FBD Graphical, signal flow Control loops, analogue processing, interlocks
Structured Text (ST) Textual, Pascal-like Calculations, algorithms, data structures
SFC Graphical, steps and transitions Sequences and batch processes

In practice the languages are combined: an SFC step calls FBD control logic, and a user-defined function block is written internally in ST but used in FBD. Vendors sometimes use other names: Siemens calls it FUP (Funktionsplan) in the German version of TIA Portal, and CODESYS and Rockwell support FBD as well.

Note the difference from IEC 61499: that standard also uses function blocks, but they are event-driven and distributed over several devices. An IEC 61131-3 FBD network runs cyclically on a single controller.


๐Ÿญ Where is FBD used?

FBD is the preferred language wherever signals are processed continuously:

  • Control loops - temperature, pressure, flow and level via PID blocks and the surrounding control loop
  • Analogue signal processing - scaling 4โ€“20 mA to engineering units, filtering, limiting (LIMIT) and signal selection (SEL, MAX, MIN)
  • Interlocks - permissives and trips for pumps and valves using AND/OR logic, see Interlock
  • Safety logic - on a Safety PLC or SIS; Siemens fail-safe programs are written in F-FBD or F-LAD
  • Drives - speed references to a variable frequency drive (VFD)

Typical sectors are water treatment, chemicals, energy, HVAC and oil and gas. An example from a sewage pumping station: the level in the wet well passes through a scaling block to a PID block, which adjusts the pump speed through the drive; a comparison block (GT) raises a high-high level alarm in SCADA, and an interlock stops the pump on dry running.

Signals arrive through Remote IO and fieldbuses or networks such as ProfiNET, Ethernet IP, Modbus TCP and Foundation Fieldbus. Process data travels via OPC UA to the HMI, Historian and MES.


โฑ๏ธ How do you set up FBD control properly?

A reliable FBD application follows a fixed approach:

  1. Standardise building blocks - create library blocks for motor, valve, analogue measurement and controller, and test them thoroughly once.
  2. Choose the right task cycle - control loops belong in a periodic task with a fixed cycle time, because PID calculations assume a constant sample interval. Fast pressure or flow loops often run in tens of milliseconds, slow temperature or level loops in hundreds of milliseconds to seconds.
  3. Keep networks small - one function per network, with clear names and comments; large networks with crossing lines quickly become unreadable.
  4. Mark feedback deliberately - check which value in a loop comes from the previous scan.
  5. Limit and supervise - put LIMIT blocks on setpoints and outputs, and add anti-windup to controllers.

Common faults during commissioning:

Symptom Likely cause
Oscillating control PID tuning too aggressive or task cycle too slow
Noisy output Noise on the measurement, missing filter
Wrong process value shown Error in scaling or measuring range
Controller stays saturated Missing anti-windup or wrong limits
Logic runs one cycle behind Incorrectly marked feedback wire

For time-critical loops, network latency and jitter also matter.


๐Ÿ” How do you secure FBD logic?

FBD programs drive the physical process directly, so anyone who changes the logic or a setpoint changes the process. Stuxnet (2010) used the Siemens engineering software to modify the PLC logic that drove frequency converters, and TRITON (2017) targeted a safety instrumented system. Possible consequences are manipulated control loops, disabled interlocks and process instability, caused by unauthorised engineering, malware, firmware manipulation or insiders.

Measure Purpose
Network Segmentation Isolate engineering and PLCs from the office network
Restrict the Engineering Station Only authorised workstations may download
MFA Strong authentication for engineering and remote access
Version Control Every change to FBD logic traceable and reversible
Change Management Review, test and record changes
Logging Record downloads and PLC mode changes
Application Whitelisting Only approved software on engineering workstations
Patch Management Fix vulnerabilities in firmware and tools
Backup Keep a known-good version of the program

IEC 62443 provides the framework for these measures. For organisations covered by the Dutch Cybersecurity Act (Cyberbeveiligingswet), in force since 15 August 2026, demonstrable control over changes to control logic is part of the duty of care.

For safety functions, IEC 61508 and IEC 61511 also apply in the process industry, and ISO 13849 and IEC 62061 for machinery. Fail-safe FBD blocks include additional diagnostics and may only be modified in the dedicated safety environment.


๐ŸŒ Does FBD remain relevant in Industry 4.0?

Yes. In Industry 4.0, control is partly moving to soft PLCs and virtualised controllers, and logic is tested against a digital twin. FBD remains useful because the language is independent of the hardware the program runs on. However, ST is gaining ground for complex calculations, data handling and version control with text-based tools.


โ“ Frequently asked questions

What does FBD mean in PLC programming?

FBD stands for Function Block Diagram, a graphical programming language from IEC 61131-3. Logic is drawn as blocks connected by lines, so signals visibly flow from input to output.

Is FBD better than Ladder Logic?

FBD is not better or worse, but suited to different work. FBD is stronger for control loops and analogue signal processing, while Ladder Logic is easier for electricians to read for discrete on/off logic. Many projects use both languages side by side.

What is the difference between FBD and IEC 61499?

FBD from IEC 61131-3 is a programming language that runs cyclically on a single controller. IEC 61499 is a separate standard with event-driven function blocks that can be distributed across several devices. Both use blocks, but their execution models differ fundamentally.

Does IEC 61131-3 include a standard PID block for FBD?

No. IEC 61131-3 defines timers, counters, edge detection and bistable blocks, but no PID controller. PID blocks in FBD come from vendor libraries, such as PID_Compact from Siemens or PIDE from Rockwell, and differ in parameters and behaviour.

Can FBD be used for safety applications?

Yes, FBD is a common language for safety logic on a safety PLC. Siemens, for example, uses F-FBD for fail-safe programs, with certified blocks for emergency stop and door monitoring. The design must still meet the requirements of IEC 61508, IEC 61511, ISO 13849 or IEC 62061.

Which software supports FBD?

FBD is supported by virtually all major engineering environments, including Siemens TIA Portal, Rockwell Studio 5000, CODESYS and the tools based on it from vendors such as Beckhoff and Schneider Electric. The look differs per tool, but the language rules follow IEC 61131-3.


๐Ÿ“Œ In summary

FBD is the graphical IEC 61131-3 language in which control logic is drawn as a network of functions and function blocks, ideal for control loops, analogue signals and interlocks. Build with tested standard blocks, watch execution order and feedback paths, and protect changes to the logic with version control, change management and segmentation according to IEC 62443. Combine FBD where needed with Ladder Logic, Structured Text and SFC.