Technical data

Basics of Designing a Program Structure
4.2 Blocks in the User Program
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 81
Block Calls
The following figure shows the sequence of a block call within a user program. The program calls
the second block whose instructions are then executed completely. Once the second or called
block has been executed, execution of the interrupted block that made the call is resumed at the
instruction following the block call.
Before you program a block, you must specify which data will be used by your program, in other
words, you must declare the variables of the block.
Note
OUT parameters must be described for each block call.
Note
The operating system resets the instances of SFB3 "TP" when a cold restart is performed. If you want
to initialize instances of this SFB after a cold restart, you must call up the relevant instances of the
SFB with PT = 0 ms via OB100. You can do this, for example, by performing an initialization routine in
the blocks which contain instances of the SFB.