This is a simple function used to deactivate all lower-level modules. The i_pstSubModulesItf field switches on all modules via their interface variable astSubModuleInterface[Index].i_xEnable = False.
Input |
Data type |
Description |
---|---|---|
i_udiNumberOfSubModules |
UDINT |
Number of modules in the i_pstSubModulesItf field |
i_pstSubModulesItf |
POINTER TO ST_StandardModuleInterface |
Address of the field for the default interfaces of the subordinate modules. |
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General, library-independent statement on the diagnostic. A value not equal to ET_Diag.Ok corresponds to an error message. |
|
q_etDiagExt |
POU-specific output on the diagnostic. q_etDiag = ET_Diag.Ok -> Status message q_etDiag <> ET_Diag.Ok -> Error message |
Data type |
Description |
---|---|
BOOL |
TRUE: All submodules have been disabled. FALSE: Not all subordinate modules could be disabled. |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
Ok |
0 |
Ok |
InputParameterInvalid |
NumberOfSubModulesRange |
66 |
The number of submodules is outside the specified range |
InputParameterInvalid |
PointerSubModulesItfInvalid |
97 |
The pointer SubModulesItf is invalid |
Enumeration name: |
NumberOfSubModulesRange |
Enumeration value: |
66 |
Description: |
The number of submodules is outside the specified range |
Issue |
Cause |
Solution |
---|---|---|
- |
The input i_udiNumberOfSubModules has a value < 1 |
On the input i_udiNumberOfSubModules a value greater than zero has to be given |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
All lower level modules are commanded to switch off.
Enumeration name: |
PointerSubModulesItfInvalid |
Enumeration value: |
97 |
Description: |
The pointer SubModulesItf is invalid |
Issue |
Cause |
Solution |
---|---|---|
- |
The input i_pstSubModulesItf is zero |
On the input i_pstSubModulesItf, the address of the array which holds the SubMoules interface structures has to be given. |