The POU can be activated using the i_xEnable input. Whether or not the POU is active can be seen at the q_xActive output. When the POU is activated, the input parameters are checked. If i_pstSubModulesItf, i_petReactionTranslationMode, i_pstReactionTranslationTable or i_pstReactionTranslationJobs is smaller or equal zero or if the specification in i_diNumberOfSubModules does not correspond to the i_udiSizeOfSubModulesItf variable, an exception is entered into the global exception list and the diagnostic outputs are set accordingly. The information from the i_udiModuleId and i_udiModuleName inputs is also entered into the exception data.
As a local ExceptionHandler, the POU distributes the reactions that come from the i_stReaction input to the submodules. For every reaction and every submodule, it must decide which reaction(s) should occur on each individual submodule. The user can influence the reaction distribution by using the i_pstReactionTranslationTable or i_pstReactionTranslationJobs. If the i_xLocalExceptionHandler input is FALSE, the POU works as global ExceptionHandler. All reactions pending due to the exceptions are collected and, on the influence of the reaction translation table or reaction translation jobs, distributed to the submodules.
The available modes for translating the reactions are explained in the ET_ReactionTranslationMode enumeration type.
Using translation modes contains examples for use.
The q_diSubModuleInException output displays the subordinate module where an exception is pending. If several submodules show an exception, the first module with an exception is displayed. This function does not depend on whether the ExceptionHandler operates as a local or global POU.
When diagnostic messages are acknowledged (AutoQuit or i_xDiagQuit), their reactions to the submodules are deleted if no other exception causes the same reaction(s).
In the case of a global ExceptionHandler the FC_DiagQuit system function is called when system diagnostic messages are acknowledged and the global exception list is deleted. An entry into the global log data list is also generated to note the global acknowledgment in the log data list.
Input |
Data type |
Description |
---|---|---|
i_xEnable |
BOOL |
A rising edge FALSE -> TRUE activates the POU, a falling edge TRUE -> FALSE deactivates the POU. A deactivated POU does not execute any actions. |
i_xDiagQuit |
BOOL |
A rising edge FALSE -> TRUE acknowledges pending system/diagnostic messages. |
i_stReaction |
||
i_udiModuleId |
UDINT |
ID of the module in which the ExceptionHandler is called up. |
i_sModuleName |
STRING[80] |
Name of the module in which the ExceptionHandler is called up. |
i_pstSubModulesItf |
POINTER TO ST_StandardModuleInterface |
Pointer onto the array of ST_StandardModuleInterface of the submodules of the node. |
i_udiSizeOfSubModulesItf |
UDINT |
Size in bytes of the structure ST_StandardModuleInterface |
i_udiNumberOfSubModules |
UDINT |
Number of submodules of the node. |
i_petReactionTranslationMode |
POINTER TO ET_ReactionTranslationMode |
Pointer onto the array of ET_ReactionTranslationMode that defines which reaction translation mode shall be used for which submodule of the node. |
i_pstReactionTranslationTable |
POINTER TO ST_Reaction |
Pointer onto the two-dimensional array of ST_Reaction, which configures the reaction translation of the ET_ReactionTranslationMode.Table mode. |
i_pstReactionTranslationJobs |
POINTER TO ST_ReactionTranslationJobs |
Pointer onto the array of ST_ReactionTranslationJobs, which configures the reaction translation of the ET_ReactionTranslationMode.Jobs mode. |
i_xLocalExceptionHandler |
BOOL |
TRUE: The function block works as local ExceptionHandler |
Output |
Data type |
Description |
---|---|---|
q_xActive |
BOOL |
TRUE: The POU is active and has to be executed further. FALSE: The POU is inactive. |
q_xReady |
BOOL |
TRUE: The POU is ready to operate and accepts user commands. FALSE: the POU is not ready to operate and does not accept user commands. |
q_etDiag |
General, library-independent statement on the diagnostic. A value unequal GD.ET_Diag.Ok equates an error message. |
|
q_etDiagExt |
POU-specific output on the diagnostic. q_etDiag = GD.ET_Diag.Ok -> status message q_etDiag <> GD.ET_Diag.Ok -> diagnostic message |
|
q_sMsg |
STRING[80] |
Event-triggered message which gives more detailed information on the diagnostic state. |
q_udiSubModuleInException |
UDINT |
TRUE: One of the submodules of the node reports an exception. |
Input/Output |
Data type |
Description |
---|---|---|
iq_stExceptionList |
Global exception list |
|
iq_stLogDataList |
Global log data list |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
Disabled |
22 |
Diagnostic message disabled |
OK |
Initializing |
37 |
Initialization |
OK |
Working |
47 |
The POU processes the function |
ControllerConditionInvalid |
ControllerInvalid |
6 |
The controller is invalid. |
InputParameterInvalid |
PointerReactionTranslationJobsInvalid |
144 |
The pointer ReactionTranslationJobs is invalid |
InputParameterInvalid |
PointerReactionTranslationModeInvalid |
146 |
The pointer ReactionTranslationMode is invalid |
InputParameterInvalid |
PointerReactionTranslationTableInvalid |
139 |
The pointer ReactionTranslationTable is invalid |
InputParameterInvalid |
PointerSubModulesItfInvalid |
97 |
The pointer SubModulesItf is invalid |
InputParameterInvalid |
ReactionTranslationEntryInvalid |
141 |
An entry of a reaction transfer is invalid |
InputParameterInvalid |
SizeOfSubModulesItfInvalid |
96 |
The size of the submodule interface is invalid |
UnexpectedProgramBehavior |
InitExceptionListFailed |
46 |
Initialization of the exception list failed. |
Enumeration name: |
ControllerInvalid |
Enumeration value: |
6 |
Description: |
The controller is invalid. |
Issue |
Cause |
Solution |
---|---|---|
- |
The controller does not provide the required conditions. |
For more details, refer to the q_sMsg output. |
Enumeration name: |
Disabled |
Enumeration value: |
22 |
Description: |
Diagnostic message disabled |
The function block is deactivated, it executes no actions whatsoever. i_xEnable and q_xActive have the value FALSE.
Enumeration name: |
InitExceptionListFailed |
Enumeration value: |
46 |
Description: |
Initialization of the exception list failed. |
Issue |
Cause |
Solution |
---|---|---|
- |
Initialization of the exception list failed. - An internal execution error occured. |
Try to initialize the exception list using the FC_InitExceptionList function. Please inform the support team about this error. |
Enumeration name: |
Initializing |
Enumeration value: |
37 |
Description: |
Initialization |
The function block is bein initialized and thus is not yet ready to receive commands at its inputs. The function block will signalize that it is ready for operation with the signal q_xReady = TRUE.
Enumeration name: |
PointerReactionTranslationJobsInvalid |
Enumeration value: |
144 |
Description: |
The pointer ReactionTranslationJobs is invalid |
Issue |
Cause |
Solution |
---|---|---|
- |
An invalid value has been applied at the input i_pstReactionTranslationJobs. |
A valid memory address unequal 0 has to be transferred to the i_pstReactionTranslationJobs input. |
Enumeration name: |
PointerReactionTranslationModeInvalid |
Enumeration value: |
146 |
Description: |
The pointer ReactionTranslationMode is invalid |
Issue |
Cause |
Solution |
---|---|---|
- |
An invalid value was applied at the i_petReactionTranslationMode input. |
A valid memory address unequal 0 has to be transferred to the i_petReactionTranslationMode input. |
Enumeration name: |
PointerReactionTranslationTableInvalid |
Enumeration value: |
139 |
Description: |
The pointer ReactionTranslationTable is invalid |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input i_pstReactionTranslationTable an invalid value has been applied. |
A valid memory address unequal 0 has to be transferred to the i_pstReactionTranslationTable input. |
Enumeration name: |
PointerSubModulesItfInvalid |
Enumeration value: |
97 |
Description: |
The pointer SubModulesItf is invalid |
Issue |
Cause |
Solution |
---|---|---|
- |
An invalid value was applied at the i_pstSubModulesItf input. |
A valid memory address unequal 0 has to be transferred to the i_pstSubModulesItf input. |
Enumeration name: |
ReactionTranslationEntryInvalid |
Enumeration value: |
141 |
Description: |
An entry of a reaction transfer is invalid |
Issue |
Cause |
Solution |
---|---|---|
- |
A reaction translation job of the ET_ReactionTranslationMode.Jobs translation mode is invalid. |
The following must apply for a translation job:
|
Enumeration name: |
SizeOfSubModulesItfInvalid |
Enumeration value: |
96 |
Description: |
The size of the submodule interface is invalid |
Issue |
Cause |
Solution |
---|---|---|
- |
The value of the i_udiSizeOfSubModulesItf input is invalid. |
The specification at the i_diNumberOfSubModules input does not correspond to the specification at the i_udiSizeOfSubModulesItf input. |