Basics
52
14. Object Save
NOTE
A DUT defined in the global variable list can be used in a POU body only when copied into the
header of the corresponding POU beforehand.
1.4.3.3 Using DUTs in a POU header
1. Open POU header from "Project" pane
2. Enter a new line with
or , if necessary
3. Under Class, select "VAR"
4. Under "Identifier", enter a symbolic name
5. Under "Type", select
to open the "Type selection" dialog
6. Under "Type Class", select "Data Unit Types"
7. Under "Type", select the desired DUT
8. [OK]
9. Under "Initial", select
to open the "Data Unit Initial Values" dialog
This dialog shows how the individual variables have been defined in the DUT. You can only change
the initial values for one single variable (not for the DUT).
10. Change initial value for the desired variable, if necessary
11. [OK]
12. Under "Comment", enter a text, if desired
13. Object Save
Now the DUT or a single variable of the DUT can be used in the POU body. The DUT can be
assigned with the help of the "Variables" pane (<F2>).
NOTE
A DUT defined in the global variable list can be used in a POU body only when copied into the
header of the corresponding POU beforehand.
1.4.3.4 DUTs with non-overlapping elements
Using the Properties dialog, you can assign a DUT one of two ways of occupying memory:
1. with overlapping elements (see page 53)
2. with non-overlappin
g elements
How DUTs with non-overlapping elements occupy memory:
All elements of the data type BOOL are lumped together in a block and allocated one after the other in a
memory area reserved for bits, beginning at a 16-bit word address.