Technical data

Creating Data Blocks
11.4 Editing and Saving Data Blocks
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 273
11.4.3 Entering the Data Structure of User-Defined Data Types (UDT)
1. Open the user-defined data type (UDT).
2. Display the declaration view if this view is not set already.
3. Define the structure of the UDT by determining the sequence of variables, their data type, and
an initial value if required using the information in the table below.
4. You complete the entry of a variable by exiting the row with the TAB key or RETURN.
Column Explanation
Address Displays the address which STEP 7 automatically assigns for the variable when you finish
entering a declaration.
Name Enter the symbolic name you have to assign to each variable here.
Type Enter the data type you want to assign to the variable (BOOL, INT, WORD, ARRAY, etc.).
The variables can have elementary data types, complex data types, or their own user-defined
data types.
Initial Value Here you can enter the initial value if you do not want the software to use the default value for
the data type entered. All values must be compatible with the data type.
When you save an instance of the user-defined data type (or a variable, or a data block) for
the first time, the initial value is used as the actual value if you have not explicitly defined
actual values for the variables.
Comment Entering a comment in this field helps to document the variables. The comment can have up
to 79 characters.