Iec029 - Init/ctor has to be called in Initialization for FunctionBlock fields that provide Init/ctor
For all fields with the attribute [Output], [Input] or [Local] of [FunctionBlock]s (classes attributed with [FunctionBlock])
that provide an Init() or ctor() method, the method has to be called in the __Init() method of the [FunctionBlock].
The method looks like this:
[Initialization]
public void __Init() {}Mostly IEC Strings provide a ctor() method and user types often provide an Init() method.
You can also use the provided automatic Code Fix to create all missing calls and the __Init() method itself. ( Press Alt + Enter on the Error line to find the Code Fix in the context menu)
Provide the __Init() method and call the Init()/ctor() methods of all fields.
