Technical data

Basics of Designing a Program Structure
4.2 Blocks in the User Program
Programming with STEP 7
94 Manual, 05/2010, A5E02789666-01
One Instance DB for Several Instances of an FB (Multiple Instances)
You can also transfer the instance data for several motors at the same time in one instance DB. To
do this, you must program the calls for the motor controllers in a further FB and declare static
variables with the data type FB for the individual instances in the declaration section of the calling
FB.
If you use one instance DB for several instances of an FB, you save memory and optimize the use
of data blocks.
In the following figure, the calling FB is FB21 "Motor processing," the variables are of data type
FB22, and the instances are identified by Motor_1, Motor_2, and Motor_3.
In this example, FB22 does not need its own instance data block, since its instance data are saved
in the instance data block of the calling FB.