The data types ANY
or ANY_<type>
are used in interfaces of functions, function blocks, or methods in order to type
input parameters whose type is unknown or unspecified: The input variables (VAR_INPUT
) have a generic data type.
The compiler replaces the type of input variable internally with the data structure described below, whereby the value is not passed directly. Instead, a pointer is passed to the actual value so only a variable can be passed. Therefore, the data type is only specified when it is called. As a result, calls of such POUs can be made using arguments which each have different data types.
Literals, replaced constants, and results of function calls or expressions cannot be passed to input variables (VAR_IN_OUT
).
-
Internal data structure for ANY and ANY_<type>
-
Declaration
-
Call