Programming Industrial Control Systems Using IEC 1131-3, Revised Edition

In this chapter we introduce many of the common programming elements that are used with all of the IEC languages. An understanding of how elements such as variables and data types are used is necessary before it is possible to go on to develop programs using Structured Text or any of the other languages.
We will see that IEC 1131-3 provides an extensive range of common elements that can be used both with the textual languages Structured Text (ST) and Instruction List (IL), and with the graphical languages Function Block Diagram (FBD) and Ladder Diagram (LD).
| Note | The languages ST, IL, FBD and LD and the common elements discussed in this chapter can be used within action blocks and transitions to construct Sequential Function Charts (SFCs) for describing time- and event-driven behaviour - for further information see Chapter 8, Sequential Function Chart . |
In this chapter we will include descriptions of elements for:
Naming software elements using identifiers, such as for variables;
Declaring variables using standard types of data;
Declaring variables from derived data types, structures and arrays of data;
Establishing the default initial values for certain types of data;
Ensuring that variables are initialised correctly.
We will then proceed to describe the main software building blocks of the language, for which the IEC has the generic name program organisation units or POUs. These are specifically functions, function blocks and programs.
Finally we will discuss how complete PLC system configurations can be declared using resources, tasks and programs.
This chapter...