Overview of IEC 61131-3 and CODESYS Compliance
Industrial automation programming requires structure, standardization, and flexibility. To meet these demands, the IEC 61131-3 standard was established. It is the third part of the international standard IEC 61131, which defines methods for programmable logic controllers (PLCs).
CODESYS was built natively to comply with IEC 61131-3, offering developers a rich set of five programming languages, each optimized for specific types of control tasks. This enables engineers to work within a familiar framework, ensuring consistency, portability, and easier maintenance of control software.
By adhering strictly to this standard, CODESYS ensures that applications are not only efficient but also scalable and transferable across different hardware platforms and projects.
Here’s a quick overview of the five languages:

Ladder Diagram (LD) in Practice
Ladder Diagram (LD) resembles the electrical relay logic diagrams familiar to many technicians and engineers. It’s especially powerful for discrete control systems like simple on/off operations.
In CODESYS, LD allows you to:
- Represent control logic visually.
- Create easy-to-follow relay-style networks.
- Quickly design interlocks and safety circuits.
🔹 Example: A simple motor start/stop control using a Start pushbutton and Stop pushbutton is best illustrated using LD.

Using LD, debugging and visualization during runtime is intuitive, making it ideal for beginners and maintenance staff.
Function Block Diagram (FBD) Techniques
Function Block Diagram (FBD) uses graphical blocks to represent functions and connect them with lines that represent data flow. It’s highly effective for:
- Configuring control loops
- Logical operations
- Mathematical computations
FBD emphasizes the functional relationships between elements, rather than the sequence of operations. In CODESYS, pre-built function blocks like timers, counters, PID controllers, and communication modules are drag-and-drop ready, enabling fast application assembly.
🔹 Typical Application Example: Designing a heating control system where temperature readings control heater outputs via PID controllers.
Structured Text (ST) for Complex Logic
Structured Text (ST) is a high-level, Pascal-like programming language used within CODESYS for implementing sophisticated algorithms and data operations.
ST is the best choice when you need to:
- Implement conditional logic (IF, CASE)
- Perform mathematical computations
- Manage arrays, structures, and loops
Example of a simple ST snippet:
IF Temperature > 75 THEN
Fan := TRUE;
ELSE
Fan := FALSE;
END_IF;
Using ST allows you to handle complex control logic much more efficiently than with graphical languages.
Sequential Function Chart (SFC) for Process Control
Sequential Function Chart (SFC) is perfect for processes that follow a defined sequence, like manufacturing stages or batch processing systems.
SFC allows:
- Dividing control tasks into steps
- Defining transitions between steps
- Visualizing the entire process flow easily
CODESYS’s SFC editor makes it simple to create clear, modular process diagrams where each step can include LD, ST, or FBD logic internally.
🔹 Typical Use Case: Automated car painting line — steps include priming, painting, drying, and inspection, each clearly defined and controlled via SFC.
How to Choose the Right Language
Choosing the right language in CODESYS depends on several factors:
Best practice:
In real-world projects, combining multiple languages within a single CODESYS project is common — for instance, using SFC for process sequencing and ST for complex calculations inside each step.
Take the Next Step
Want to master CODESYS’s programming languages for your projects? Whether you’re starting from LD or diving into complex ST algorithms, we can guide you through it.
👉 Contact Our Training Team and take your automation skills to the next level!