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.
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 |
||
i_ifStateModelHandler |
This parameter is used to pass the interface to the instance of the FB_StateModelHandlerBase. |
Output |
Data type |
Description |
---|---|---|
q_etResult |
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. |