Technical data
Basics of Creating Logic Blocks
10.2 Editing the Variable Declaration
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 245
In the variable detail view, you specify the local variables and the formal parameters for the block
as well as the system attributes for parameters. This has the following effects:
• During declaration, sufficient memory space is reserved for temporary variables in the local
data stack, and in the case of function blocks, for static variables in the instance DB to be
associated later.
• When setting input, output, and in/out parameters you also specify the "interface" for the call of
a block in the program.
• When you declare the variables in a function block, these variables (with the exception of the
temporary variables) also determine the data structure for every instance DB that is associated
with the function block.
• By setting system attributes you assign special properties, for example, for the configuration of
message and connection functions, for operator control and monitoring functions and the
process control configuration.
10.2.2 Interaction Between The Variable Detail View And The Instruction List
The variable declaration and instruction list of logic blocks are closely related, because for
programming the names specified in the variable declaration are used in the instruction list. All
changes in the variable declaration will therefore influence the entire instruction list.
Action in the Variable Declaration Reaction in the Code Section
Correct new entry If invalid code present, previously undeclared variable
now becomes valid
Correct name change without type change Symbol is immediately shown everywhere with its new
name
Correct name is changed to an invalid name Code remains unchanged
Invalid name is changed to a correct name If invalid code is present, it becomes valid
Type change If invalid code is present, it becomes valid and if valid
code is present, this may become invalid
Deleting a variable (symbolic name) used in the code Valid code becomes invalid
Change to comments, faulty input of a new variable, change to an initial value, or deleting an
unused variable has no effect on the instruction list.