Support : Support Documents : IEC-61131

What is IEC 61131?

The standard IEC 61131 has been established to standardize the multiple languages, sets of instructions and different concepts existing in the field of automation systems. The great variety of PLC concepts has led to an incompatibility between the different PLC platforms and manufacturers. The result was a great effort to be made for training, hard- and software investments.
IEC 61131 standardizes the programming languages, the interfaces between PLC and programming system, the sets of instructions and the handling and structuring of projects. The advantage of using IEC 61131 conform PLCs and programming systems is a portability of all platforms and the use of same concepts reducing costs for automation systems.

The standard consists of several parts and technical reports. The third part of the standard is dedicated to programming languages.
Obviously this standard has a great influence on the concept, structure, features and the handling of a programming system such as Pro-H and the way to program the system.
The main changes that have come with IEC 61131-3 are:

· Declaration of variables is similar to the variable declaration in higher programming languages.
· Declaration of data types is possible.
· Global and local data can be differentiated.
· Programming means symbolic programming.

You can get information about the following topics:

Configuration elements in IEC 61131-3
POUs in IEC 61131-3
Data types in IEC 61131-3
Variables in IEC 61131-3

Copyright by Hitachi Ltd.



Configuration elements in IEC 61131-3

An IEC 61131-3 conform PLC programming system reflects the hardware structure with the configuration elements. These configuration elements are basically configurations, resources and tasks.
Configurations in IEC 61131-3
A configuration can be compared to a programmable controller system, e.g. a rack. In a configuration one or several resources can be defined.
Resources in IEC 61131-3
A resource can be compared to a CPU which can be inserted in the rack. In a resource global variables can be declared, which are only valid within this resource. In a resource one or several tasks can be executed.

Tasks in IEC 61131-3
Tasks determine the time scheduling of the programs associated with them. This means that programs have to be associated to tasks. The settings of the task determine the time scheduling.
IEC 61131-3 describes different time scheduling which lead to three different task types:

· Cyclic tasks are activated in a certain time interval and the program is executed periodically.
· Error tasks will be activated if an error occurs in a different task.
· Event or interrupt tasks are activated if a certain event has happened.

Each task has a certain priority. In so called preemptive scheduling systems, an active task with low priority is interrupted immediately, when a task with higher priority becomes active due to a certain event. In systems with non-preemptive scheduling, task interruptions by tasks with higher priority are not possible.

Note: The supported task types depend on the used PLC.

Copyright by Hitachi Ltd.
Top



POUs in IEC 61131-3

Program organization units or POUs are the language elements of a PLC program. They are small, independent software units containing the program code. The name of a POU should be unique within the project.
In IEC 61131-3 three types of POUs are distinguished referring to their different use:

· programs
· function blocks
· functions

Each POU consists of two different parts: The declaration part and the code body part.
In the declaration part all necessary variables are declared.
The instruction or code body part of a POU is the part in which the instructions are programmed in the desired programming language.

Copyright by Hitachi Ltd.
Top



Data types in IEC 61131-3

Data types determine what kind of value the variable can have. Data types define the initial value, range of possible values and the number of bits.
IEC 61131-3 distinguishes three kinds of data types:

· Elementary data types
· Generic data types
· User defined data types

Copyright by Hitachi Ltd.
Top



Variables in IEC 61131-3

In IEC 61131-3 different types of variables are described:

· Symbolic variables
· Directly represented variables
· Located variables

Variables have to be declared in the variable worksheet of the POU using keywords.

Copyright by Hitachi Ltd.
Top