The effect of this pragma is that a method decorated with is called if the data type of the function blocks referenced there changes in the superordinate function block. The referencing can be defined by a pointer variable or a REFERENCE TO variable.
Syntax:
{attribute 'call_on_type_change' := ' <comma-separated names of the referenced function modules> '}
Insert location: Line above the first line in the method declaration
Example 258. Example
The FB_A function block references FB_B and FB_C.
FUNCTION_BLOCK FB_A
VAR
var_pt: POINTER TO FB_B;
var_ref: REFERENCE TO FB_C;
END_VAR
...
The METH_react_on_type_change method is called when the data type of FB_B or FB_C changes.
{attribute 'call_on_type_change' := 'FB_B, FB_C'}
METHOD METH_react_on_type_change : INT
VAR_INPUT
...