Skip to main content

FB_Init

code. You can evaluate the return value.methods explicitly and provide additional code there with the standard initializationThe return value is not evaluated. For a specific influence, you can also declare theFB_Init is always available implicitly and it is used primarily for initialization.## Short summary Initializes the CycleManagerConfigurator with required cycle manager parameters.

  • Return type: BOOL

Parameters

NameTypeCommentKind
bInitRetainsBOOLTRUE: the retain variables are initialized (reset warm / reset cold)input
bInCopyCodeBOOLTRUE: the instance will be copied to the copy code afterward (online change)input
cycleManagerDefaultCNM_CycleManagerInterfaces.ICycleManagerDefaultParametersInterface for default cycle manager parametersinput
cycleManagerStepICycleManagerStepParametersInterface for step-specific cycle manager parametersinput

Code

Declaration

METHOD FB_Init: BOOL
VAR_INPUT
bInitRetains: BOOL; // TRUE: the retain variables are initialized (reset warm / reset cold)
bInCopyCode: BOOL; // TRUE: the instance will be copied to the copy code afterward (online change)
cycleManagerDefault :CNM_CycleManagerInterfaces.ICycleManagerDefaultParameters; //Interface for default cycle manager parameters
cycleManagerStep :ICycleManagerStepParameters; //Interface for step-specific cycle manager parameters
END_VAR

Implementation

THIS^.cycleManagerDefault := cycleManagerDefault;
THIS^.cycleManagerStep := cycleManagerStep;
THIS^.defaultConfigurator.cycleManager := cycleManagerDefault;
THIS^.stepConfigurator.cycleManager := cycleManagerStep;