EcoStruxure Machine Expert version 1.1 does not support the M258, LMC058 and LMC078 controllers.

Attribute call_on_type_change

Overview

Attach the Attribute call_on_type_change pragma to methods of a function block A in order to achieve that this method is called when the data type is changed for one or more function blocks B, C, etc. that are referenced by A. The function blocks can be referenced by pointers or references.

Syntax

{attribute 'call_on_type_change':= '<name of the first referenced function block>|<name of the second referenced function block>|<name of the nth referenced function block>'}

Insert the Attribute call_on_type_change above the first line in the method declaration.

Examples

Example of a function block with references:

FUNCTION_BLOCK FB_A
...
VAR
    var_pt: POINTER TO FB_B;
    var_ref: REFERENCE TO FB_C;
END_VAR
...

Example of a method that is called when data types are changed in the referenced function blocks FB_B and FB_C:

{attribute 'call_on_type_change' := 'FB_B,
FB_C'}
METHOD METH_react_on_type_change : INT
VAR_INPUT
...