Technical data

Creating Data Blocks
11.4 Editing and Saving Data Blocks
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 271
11.4.2 Entering and Displaying the Data Structure of Data Blocks Referencing an
FB (Instance DBs)
Input
When you associate a data block with a function block (instance DB), the variable declaration of
the function block defines the structure of the data block. Any changes can only be made in the
associated function block.
1. Open the associated function block (FB).
2. Edit the variable declaration of the function block.
3. Create the instance data block again.
Display
In the declaration view of the instance data block you can display how the variables in the function
block were declared.
1. Open the data block.
2. Display the declaration view of the data block if this view is not set already.
3. See below for more information on the table displayed.
With data blocks which are not shared, the declaration view cannot be changed.
Column Explanation
Address Displays the address which STEP 7 automatically assigns for the variable.
Declaration This column shows you how the variables in the variable declaration of the function block are
declared:
Input parameter (IN)
Output parameter (OUT)
In/out parameter (IN_OUT)
Static data (STAT)
The declared temporary local data of the function block are not in the instance data block.
Name The symbolic name assigned in the variable declaration of the function block.
Type Displays the data type assigned in the variable declaration of the function block. The variables
can have elementary data types, complex data types, or user-defined data types.
If additional function blocks are called within the function block for whose call static variables
have been declared, a function block or a system function block (SFB) can also be specified
here as the data type.
Initial Value The initial value that you entered for the variable in the variable declaration of the function
block if you do not want the software to use the default value.
When you save 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 The comment entered in the variable declaration for the function block to document the data
element. You cannot edit this field.