Skip to main content

Initialization of Module Instances (Online Change)

Initialization and reinitialization of module instances and proxy instances (online change)

The method IBaseInstance.Init(bOnlineChange : BOOL)) is called after a download or an online change for all toplevel module instances and for all proxy instances. The modules are responsible for calling all managed module instances, if necessary. Init is called as soon as all parameter values, managed and referenced module instances are set and the module instances have been mounted in the module tree, but before the tasks are started or continued.

The standard implementation in function block Module calls all submodules.

The methods IBaseInstance.OnBeforeOnlineChange and IBaseInstance.OnAfterOnlineChange are called before and after the structure of the module tree has been recreated and the parameter values have been changed. Furthermore the methods are called before and after all submodules and referenced modules have been reassigned, but before the tasks are (re-)started.

Tip

In contrast to FB_Init, this method is called at every online change, regardless of whether FB_Exit has been called on the old instance before.