Function Block Diagram Programming in Studio 5000
Key Takeaway
How to use Function Block Diagram programming in Studio 5000 for Allen-Bradley PLCs — built-in blocks, wiring, and PID control applications.
Quick Answer
Function Block Diagram (FBD) is a graphical programming language in Studio 5000 that uses interconnected blocks with input and output pins. FBD is preferred for continuous process control, analog signal processing, and PID loops where the signal flow is more intuitive than relay-style ladder logic.
What Is Function Block Diagram?
FBD is one of the four IEC 61131-3 programming languages. It represents logic as a network of graphical blocks connected by wires. Each block performs a function (math, comparison, timing, PID control) and passes its output to downstream blocks. This approach naturally models the signal flow in process control applications.
FBD vs Ladder Logic — When to Choose FBD
- Choose FBD for: PID control loops, analog signal conditioning, continuous process control, and applications where you think in terms of signal flow rather than relay logic.
- Choose Ladder for: Discrete I/O, motor control, interlocks, and applications where maintenance electricians will troubleshoot the code.
Studio 5000 FBD Canvas
The FBD editor provides a canvas where you place function blocks, input references (IREFs), output references (OREFs), and wire connections (ICONs). Blocks execute left-to-right, top-to-bottom by default. Execution order can be explicitly set for complex diagrams.
Adding and Connecting Function Blocks
- Open an FBD routine in Studio 5000.
- Drag a function block from the instruction toolbar (e.g., ADD, MUL, TONR, PIDE).
- Add input references (IREFs) connected to source tags.
- Add output references (OREFs) connected to destination tags.
- Wire block outputs to the next block's inputs using the connection tool.
Commonly Used Built-In Blocks
- TONR — Retentive timer on-delay
- PIDE — Enhanced PID controller (see PID Loop Configuration)
- FGEN — Function generator (linearization, custom curves)
- OSRI — One-shot rising edge
- OSFI — One-shot falling edge
- MUX — Multiplexer (select from multiple inputs)
- SEL — Selector (two-input select based on condition)
Using the PIDE Block for PID Control
The PIDE block is the primary PID instruction in FBD. Wire the process variable (PV) input from a scaled analog input, configure the setpoint (SP), and connect the control variable (CV) output to a scaled analog output. Tuning parameters (Kp, Ki, Kd) are configured in the block's properties. For detailed PID configuration, see the PID Loop Configuration guide.
Example: Analog Input to PID to Analog Output
[AI_Pressure_Raw] → [SCL Scale Block] → [PIDE PID Block] → [AO_Valve_Output]
↑
[SP_Pressure_Setpoint]
This signal flow reads a raw analog input, scales it to engineering units, feeds it to a PID controller with a configurable setpoint, and drives an analog output to a control valve.
Frequently Asked Questions
Ladder Logic uses relay-style rungs suited to discrete control logic. Function Block Diagram uses graphical blocks with wired inputs and outputs, more intuitive for continuous process control and analog signal flow.
Yes. Add-On Instructions (AOIs) appear as function blocks in FBD and can be wired into the diagram alongside built-in blocks.