Technical data
Appendix
27.3 Data Types and Parameter Types
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 629
27.3.4.9 Transferring to IN_OUT Parameters of a Function Block
When complex data types are transferred to IN_OUT parameters of a function block (FB) the
address of the variable is transferred (call by reference).
When elementary data types are transferred to IN_OUT parameters of a function block the values
are copied into the instance data block before the function block is started and copied out of the
instance data block after the function block is ended.
This means IN_OUT variables of elementary data type can be initialized with a value.
It is not possible, however, to specify a constant in place of an IN_OUT variable as the actual
parameter in a call because a constant cannot be written to.
Variables of the data type STRUCT or ARRAY cannot be initialized because only one address is in
the instance data block in this case.