Learn PLCs free

IEC 61131-3 Function Block Reference Library

A complete reference for every standard function block in PLC programming. Each entry includes input/output definitions, ladder logic examples, structured text code, timing diagrams, and platform-specific notes for Siemens, Allen-Bradley, and CODESYS.

50
Function Blocks
10
Categories
3
PLC Platforms

IEC 61131-3 defines a set of standard function blocks that form the building blocks of PLC programs across all major platforms. These function blocks include timers (TON, TOF, TP), counters (CTU, CTD, CTUD), bistables (SR, RS), edge detectors (R_TRIG, F_TRIG), comparison operations, math functions, type conversions, process control blocks like PID, string operations, and selection functions. Understanding these function blocks is essential for writing portable, maintainable PLC code that works across Siemens TIA Portal, Allen-Bradley Studio 5000, CODESYS, and other IEC-compliant environments.

T

Timers & Counters

Timer and counter function blocks for controlling time-based operations and counting events in PLC programs.

C

Counters

Counter function blocks for tracking events, quantities, and sequential operations in industrial automation.

B

Bistables & Edge Detection

Bistable (flip-flop) and edge detection function blocks for latching outputs and detecting signal transitions.

C

Comparison Operations

Comparison function blocks for evaluating relationships between values in PLC logic.

M

Math Operations

Mathematical function blocks for arithmetic calculations in PLC programs.

D

Data Movement & Bit Shifting

Function blocks for moving data between registers and performing bit manipulation operations.

T

Type Conversion

Type conversion function blocks for converting between different data types in IEC 61131-3 programs.

P

Process Control

Advanced process control function blocks including PID controllers, PWM outputs, and signal conditioning.

S

String Operations

String manipulation function blocks for handling text data in PLC programs.

S

Selection & Limiting

Selection and limiting function blocks for choosing between values and clamping signals within ranges.

Put These Function Blocks Into Practice

Get 20 production-ready ladder logic templates that use these function blocks in real-world applications -- motor control, PID loops, safety interlocks, and more.

Get the Ladder Logic Pack -- $29

Free PLC simulator

Wire this block up and run it

Drop the instruction into a rung, hit Run, and watch it execute in your browser. 12 guided lessons across 8 PLC dialects — free account, no credit card.

Practice PLCs free →