DefineUnitModeWithHandler (Method)

Overview

Type:

Interface

Available as of:

V1.4.2.0

Inherits from:

Description

The method DefineUnitModeWithHandler has the same functionality as the method DefineUnitMode(). In addition, however, the method DefineUnitModeWithHandler offers the possibility of passing an instance of the function block FB_StateModelHandlerBase. This gives the FB_UnitModeManager2 access to this instance and using the ExecuteCurrentState() method, the corresponding state method of the instance is invoked.

Interface

Input

Data type

Description

i_sName

STRING

Refer to the interface of DefineUnitMode (Method).

i_diValue

UDINT

i_diStatesDisabled

DINT

i_diStatesModeChangeAllowed

DINT

i_etInitialState

ET_States

i_ifStateModelHandler

IF_StateModelHandler

This parameter is used to pass the interface to the instance of the FB_StateModelHandlerBase.

Output

Data type

Description

q_etResult

ET_Result

Provides diagnostic and status information as a numeric value.

If q_xError = FALSE, q_etResult provides status information.

If q_xError = TRUE, q_etResult provides diagnostic/error information.

q_sResultMsg

STRING

Provides additional diagnostic and status information as a text message.

Return Value

Output

Data type

Description

DefineUnitModeWithHandler

BOOL

Indicates TRUE if the method is completed successfully.