The modules of the template form a tree with its sub-modules and on its peak stands the MainMachine. The function accesses the tree. It searches the specified module via i_udiModuleId and indicates the ID of all submodules of the module.
Input |
Data type |
Description |
---|---|---|
i_pstMachineStandardItf |
POINTER TO ST_StandardModuleInterface |
Pointer to the default interface of the MainMachine. Connect this input always to "ADR(SR_MainMachine.stMachineInterface)". |
i_udiModuleId |
UDINT |
Id of the modul which submoduls should be read out. |
i_pudiResultSet |
POINTER TO UDINT |
Array to write the Id of the submodules. Connect the address of a variable of the type "ARRAY[1..c_diResultSetSize] OF UDINT" to this input; Example: "ADR(audiResultSelt)" |
i_udiResultSetSize |
UDINT |
The size of the array applied at i_pudiResultSet. For the above example this would be c_diResultSetSize. |
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 |
---|---|
UDINT |
>=0 The number of submodules of the desired module. This relates to the number of entries written into the array. |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
Ok |
0 |
Ok |
OK |
ResultSetSizeRange |
69 |
ResultSetSize is outside the valid range. |
ExecutionAborted |
MissingExtInit |
56 |
Initialization of the Ext structure failed. |
InputParameterInvalid |
ModuleIdInvalid |
67 |
The module ID is invalid. |
InputParameterInvalid |
PointerMachineStandardItfInvalid |
58 |
The pointer MachineStandardItf is invalid |
InputParameterInvalid |
PointerResultSetInvalid |
68 |
The pointer onto ResultSet is invalid. |
InputParameterInvalid |
ResultSetSizeRange |
69 |
ResultSetSize is outside the valid range. |
UnexpectedProgramBehavior |
UnexpectedFeedback |
10 |
An unintended error has been detected during execution. |
Enumeration name: |
MissingExtInit |
Enumeration value: |
56 |
Description: |
Initialization of the Ext structure failed. |
Issue |
Cause |
Solution |
---|---|---|
- |
Initialization of Ext failed |
The parameter ET_Diag must be OK |
Enumeration name: |
ModuleIdInvalid |
Enumeration value: |
67 |
Description: |
The module ID is invalid. |
Issue |
Cause |
Solution |
---|---|---|
- |
TheModulId is invalid |
The parameter ET_Diag must be OK |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The GetSubModuleIds function was executed without errors
Enumeration name: |
PointerMachineStandardItfInvalid |
Enumeration value: |
58 |
Description: |
The pointer MachineStandardItf is invalid |
Issue |
Cause |
Solution |
---|---|---|
- |
The pointer MachineStandardItf is invalid |
The parameter ET_Diag must be OK |
Enumeration name: |
PointerResultSetInvalid |
Enumeration value: |
68 |
Description: |
The pointer onto ResultSet is invalid. |
Issue |
Cause |
Solution |
---|---|---|
- |
The pointer ResultSet is invalid |
The variable ResultSet must be >0 |