IEC 61131-3 – What Is This
The International Electrotechnical Commission is a non-profit group that creates electrical standards. In 1993 the group published the IEC 61131-3 standard. In 1993 the group published the IEC 61131-3 standard containing the following eight parts: General information, Requirements and tests for equipment, Languages of programming, User guidelines, Communications, Messages, and Fuzzy logic control.
Programmers are most concerned with Part 3, which defines the languages and common elements of programming standards. Standard common elements are data types, variables, configuration, resources, and tasks. Data types include standard (Byte, Boolean, Integer, string, word, float, etc.), or UDT (User Defined Type). UDT is a data type that organizes your data into a manageable and quantifiable structure and allows application specific customization of multiple standard data types by combing, grouping, and nesting. UT allows easy data transfer by grouping and organizing the data into structures.
Programming units can be divided into three separate categories: functions, function blocks, and programs. Functions are logics that do not require pre-allocated memory. A function block is encapsulated logic with I/O modules that has the capability of retaining memory between scans. Programs are parts of code with specific execution criteria. A program’s logic can be cyclical (fast running and looping), periodic (time-based), or event driven (triggered by an event).
Five programming languages are supported by the IEC 61131-3 standard, which are Instruction List, Function Block Diagram, Structured Text, Ladder Diagram, and Sequential Function Charts.
Instruction List (IL) resembles assembly code and is advantageous for low-scale operations. It may be optimized for efficient function in specific situations.
Function Block Diagram (FBD) uses a set of graphical blocks that are interconnected to show the program’s logical flow. FBD is similar to Boolean logic diagrams (employed in digital circuit design).
Structured Text (ST) is a text-based language that is used for creating high-level logic functions and is suitable for array, string, and math operations.
Ladder Diagram (LD) is a graphical representation of logic, similar to an electrical relay logic diagram. LD is suitable for bit logic that involves digital I/O, and is fairly easy to learn and popular in the US.
SFC is a graphical language that resembles a flow chart. The language is high level and designed for sequential operations. The language is used for step by step operations and to create complicated state logic. SFC is perfect for debugging.
It can be challenging to choose a language. The best way of achieving this objective is to evaluate the current situation and decide on a language capable of solving the problem.
IEC 31131-3 standard has many benefits including debugging, reduced training, and maintenance time and code reusability which reduces costs for subsequent systems. It is also more beneficial for consistency and reducing errors that occur as a result of standardization. Multiple languages can be used in the same program allowing easy collaboration.
To read about the languages supported by IEC-61131-3 standard, visit iec-61131-3.com, where you will find a lot of info on IEC-611313 standard