53
Id.-Nr.: 1556.212.1-07
Appendix: Tutorial - creating an IEC project
Fig. 18.27:
Program editor of the POU
18.2
Creating a simple program
The newly created POU is now expanded through programming: A numerical vari-
able needs to be created that changes its value cyclically.
The necessary entries (declaration of a numerical variable, value change of the vari-
able) can be carried out in the displayed editor via keyboard entries in the program-
ming language ST ( structured text) selected during the creation of the module. The
upper editing area is intended for variable declarations and the editing area under-
neath (still empty) for program actions.
However, there are also tools in MotionCenter that help to create the correct program
commands. Dialogue supported variables can be created via the main menu com-
mand
Edit > Auto Declare...
:
Fig. 18.28:
The dialogue "Variable Declaration" supports the creation of a variable.
Enter the name and data type of the variable. If you are not yet familiar with the data
types available in MotionCenter, click on the button ">" next to the entry field "Type"
and via "Input assistance" open an input Wizard to select the desired data type there:
Fig. 18.29:
Input assistance for the selection of a data type
In this tutorial, a variable X of the type DINT is to be declared: