1. What Is FBD?
FBD stands for Function Block Diagram. It is a PLC programming language that represents control logic as a visual diagram of blocks, inputs, outputs, and connecting lines.
[Input] → [Logic block] → [Output]
[Start_Button] → [AND] → [Motor_Run]The program is assembled from functional blocks. Connections show how signals travel from inputs to outputs.
2. Where FBD Is Used
FBD is used in industrial automation for signal processing, interlocks, start permissives, Start/Stop holding logic, timers, latches, conveyors, pumps, valves, and simple equipment sequences.
For example, a motor may run only when Start is pressed and the protective door is closed:
[Start_Button] ─────┐
├── [AND] ──> [Motor_Run]
[Safety_OK] ────────┘3. Parts of an FBD Diagram
An FBD diagram normally contains four elements: inputs, functional blocks, connections, and outputs.
4. Inputs
An input is a signal entering the program. It may come from a button, sensor, limit switch, emergency circuit, another PLC, an operator panel, a robot, or a drive.
Typical names are Start_Button, Stop_Button, Door_Closed, Part_Sensor, and Emergency_OK. Inputs are usually placed on the left because the diagram is read from conditions to results.
[Start_Button] ──>5. Outputs
An output is a result of program execution. It can control a motor, lamp, valve, relay, drive, buzzer, or robot-start command.
Typical names are Motor_Run, Lamp_On, Valve_Open, Alarm_Buzzer, and Robot_Start. Outputs are usually placed on the right.
──> [Motor_Run]6. Functional Blocks
A functional block performs a specific operation:
| Block | Purpose |
|---|---|
| AND | Activates its output when all inputs are active |
| OR | Activates its output when at least one input is active |
| NOT | Inverts a signal |
| RS | Stores an on/off state with reset priority |
| TON | Delays turning an output on |
| TOF | Delays turning an output off |
[Input_1] ─────┐
├── [AND] ──> [Output_1]
[Input_2] ─────┘Here Output_1 turns on only when Input_1 and Input_2 are both on.
7. Connections Between Blocks
Connections show where a signal is sent, usually from one element's output to another element's input:
[Input_1] ──> [NOT] ──> [Output_1]Input_1 enters NOT; the result is passed to Output_1. TRUE becomes FALSE, and FALSE becomes TRUE.
8. Reading an FBD Diagram
Read from left to right: input conditions, processing blocks, then the result.
- 1. Find the inputs.
- 2. Identify the blocks they enter.
- 3. Determine what each block does.
- 4. Follow the signal to the output.
- 5. Determine when the output will turn on.
[Start_Button] ─────┐
├── [AND] ──> [Motor_Run]
[Door_Closed] ──────┘Motor_Run turns on if Start_Button = TRUE and Door_Closed = TRUE. The motor may start only with Start pressed and the door closed.
9. A Simple FBD Program
There are two conditions and one output:
Input_1 — Start_Button
Input_2 — Safety_OK permissive
Output_1 — Motor_Run commandThe task is to run the motor only when Start is pressed and Safety_OK is active:
[Input_1: Start_Button] ─────┐
├── [AND] ──> [Output_1: Motor_Run]
[Input_2: Safety_OK] ────────┘10. Signal Table
| Signal | Type | Purpose |
|---|---|---|
| Input_1 | Input | Start button |
| Input_2 | Input | Operating permissive |
| Output_1 | Output | Motor run command |
| Input_1 | Input_2 | Output_1 |
|---|---|---|
| FALSE | FALSE | FALSE |
| TRUE | FALSE | FALSE |
| FALSE | TRUE | FALSE |
| TRUE | TRUE | TRUE |
The output turns on only in the last row, with both inputs TRUE.
11. Why FBD Helps Beginners
The diagram makes the program structure visible. You can trace where a signal came from, which blocks processed it, what result they produced, and why an output did or did not turn on.
The condition Motor_Run = Start_Button AND Safety_OK is visible directly as the two inputs connected to AND and then to the motor output.
12. FBD and Textual Code
In a textual language, the same condition could be written:
Motor_Run := Start_Button AND Safety_OK;FBD represents it using blocks and connections. Both describe the same logic; the difference is its presentation.
| Approach | Representation |
|---|---|
| Textual code | A condition written as a statement |
| FBD | A condition assembled from blocks and connections |
FBD is often convenient for beginners because the signal path is visible.
13. Signal Direction
Signals are passed from one element to another. In Input_1 → NOT → Output_1, the output receives the result of NOT, not the original input:
Output_1 = NOT Input_1Ignoring signal direction can lead to an incorrect interpretation of the program.
14. Simulator Practice
Open the example in the editor. Output_1 should turn on only when both inputs are active.
- 1. Start the simulation.
- 2. Set Start_Button = TRUE; with Safety_OK FALSE, Motor_Run remains FALSE.
- 3. Set Safety_OK = TRUE; check that Motor_Run becomes TRUE.
- 4. Return either input to FALSE; check that Motor_Run becomes FALSE again.
The exercise shows how the inputs, AND block, and output are connected.
15. What to Understand
FBD describes a PLC program visually: inputs → functional blocks → outputs. Inputs show external signals, blocks evaluate logic, and outputs receive the result and control equipment.
16. Key Points
FBD builds PLC logic from inputs, outputs, functional blocks, and connecting lines. Read a diagram from left to right and trace each signal through the blocks to understand the output conditions.
Practice block
Open the related example in the editor, run the simulation, and repeat the exercise from the article. The JSON is also available as a direct download.