askvity

What is FBD in PLC?

Published in PLC Programming 4 mins read

FBD in PLC stands for Function Block Diagram, a popular graphical programming language used to develop programs for Programmable Logic Controllers.

Function Block Diagram (FBD) is a graphical language used to represent PLC programs in terms of reusable software blocks. This visual approach makes it easier for engineers and technicians to understand and troubleshoot complex control logic.

Understanding Function Block Diagrams

At its core, FBD utilizes a diagrammatic representation similar to electronic circuits, where signals flow through different functional blocks.

  • Functional Blocks: These are pre-defined or user-defined program instruction units. Each block performs a specific task or algorithm.
  • Signal/Data Flow: The diagram shows how signals and data connect inputs to function blocks and how the outputs of one block become the inputs of another.

As stated in the reference, FBD "depicts the flow of signals and data through these blocks, which are program instruction units that produce one or more output values when executed." This highlights the data flow aspect and the modularity provided by the function blocks.

Key Concepts in FBD

  • Inputs and Outputs: Each function block has inputs (on the left) and outputs (on the right). Lines connecting blocks represent the flow of data.
  • Connections: Lines represent variables (tags) that carry data between the inputs and outputs of blocks.
  • Block Execution: When the PLC scans the program, each function block is executed in a defined order, processing its inputs and producing outputs.

Why Use FBD?

FBD offers several advantages for PLC programming:

  • Modularity: Programs are built using reusable blocks, simplifying development and maintenance.
  • Readability: The graphical format is often more intuitive than text-based languages, especially for control loops and logic involving multiple steps.
  • Standardization: Common functions (like timers, counters, PID controllers) are available as standard blocks.
  • Troubleshooting: The visual flow makes it easier to trace signals and identify issues.

Common Function Blocks

Many standard function blocks are available in FBD, such as:

  • Logic Gates: AND, OR, NOT, XOR
  • Timers: ON-delay, OFF-delay, Retentive Timer
  • Counters: Up, Down, Up/Down
  • Mathematical Functions: ADD, SUB, MUL, DIV
  • Comparison Blocks: EQU, NEQ, GT, LT
  • PID Controllers: For process control applications

Structure and Example

An FBD program consists of networks, where each network typically represents a logical section of the overall program.

Example Structure:

+-----------------+     +-----------------+     +-----------------+
| Input Variable  |---->| Timer Block (TON)|---->| Output Variable |
| (e.g., Start_PB)|     | (Preset: 5s)    |     | (e.g., Motor_Run)|
+-----------------+     +-----------------+     +-----------------+
                         |                   ^
                         | Enable In         |
                         | Done Out -------->+
                         |                   |
                         +-------------------+

This simple example shows an input (Start_PB) triggering a Timer block (TON). When the timer is done (after 5 seconds), its 'Done Out' signal could be connected to enable an output (Motor_Run), although the direct connection shown is illustrative of signal flow.

FBD in Relation to Other PLC Languages

PLCs can be programmed using several languages defined by the IEC 61131-3 standard. FBD is one of these, alongside:

Language Type Description
Ladder Diagram (LD) Graphical Resembles electrical relay logic diagrams.
Structured Text (ST) Text-based High-level programming language similar to Pascal.
Instruction List (IL) Text-based Low-level, assembly-like language.
Sequential Function Chart (SFC) Graphical Organizes program execution flow sequentially.

FBD is often preferred for applications involving significant data flow or control algorithms.

Related Articles