Technical data
Appendix
27.3 Data Types and Parameter Types
Programming with STEP 7
628 Manual, 05/2010, A5E02789666-01
Valid Data Types for the Call of a Function Block by a Function Block
You can assign the formal parameters of a calling FB to the formal parameters of a called FB. The
following figure illustrates the formal parameters of FB10 that are assigned as actual parameters to
the formal parameters of FB12.
STEP 7 restricts the assignment of the formal parameters of an FB to the formal parameters of
another FB. You cannot, for example, assign input and output parameters with complex data types
as the actual parameters for the input and output parameters of a called FB. You can, however,
assign input parameters of the parameter types TIMER, COUNTER, or BLOCK to the input
parameters of the called FB.
The following table shows the permitted data types (z) when an FB calls another FB.
Declaration Type Elementary
Data Types
Complex
Data
Types
Parameter
Type
Parameter
Type
Parameter
Type
Parameter
Type
Parameter
Type
TIMER COUNTER BLOCK POINTER ANY
Input −> Input
z z z z z
-- --
Input −> Output -- -- -- -- -- -- --
Input −> In/out -- -- -- -- -- -- --
Output −> Input -- -- -- -- -- -- --
Output −> Output
z z
-- -- -- -- --
Output −> In/out -- -- -- -- -- -- --
In/out −> Input
z
-- -- -- -- -- --
In/out −> Output
z
-- -- -- -- -- --
In/out −> In/out
z
-- -- -- -- -- --