Update of the pointer of a command table within a command table list to make the access online change save.
The function searches in the i_pstListofCmdTables command tables for the i_diCmd command from 1 to i_udiNumberofCmdTables and updates the pointer of the command table in the i_pstListofCmdTables list using i_pstCmdTable.
The position of the command table in the memory can change due to an online change. If the pointer onto this command table is not updated, incorrect commands are read, which can result in unforeseeable behavior of the machine.
Input |
Data type |
Description |
---|---|---|
i_pstListofCmdTables |
POINTER TO ST_CmdTable |
The list of command tables of the equipment module. |
i_udiNumberOfCmdTables |
UDINT |
The number of command tables in the list at the i_pstListofCmdTables input. |
i_diCmd |
DINT |
The command for the command table that shall be updated. |
i_pstCmdTable |
POINTER TO ST_Cmd |
The pointer onto the command table. |
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 |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
Ok |
0 |
Ok |
InputParameterInvalid |
CmdRange |
35 |
A command is outside the valid range. |
InputParameterInvalid |
NumberOfCmdTablesRange |
34 |
The number of command tables is outside the valid range. |
InputParameterInvalid |
PointerCmdTableInvalid |
36 |
The pointer onto CmdTable is invalid. |
InputParameterInvalid |
PointerListOfCmdTablesInvalid |
33 |
The pointer onto ListOfCmdTables is invalid. |
Enumeration name: |
CmdRange |
Enumeration value: |
35 |
Description: |
A command is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
A value <= 0 was applied at the i_diCmd input. |
Make sure that a positive value is transferred according to the command of the table to be updated at the i_diCmd input. |
Enumeration name: |
NumberOfCmdTablesRange |
Enumeration value: |
34 |
Description: |
The number of command tables is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the i_udiNumberOfCmdTables input a value <= 0 has been applied. |
Make sure that at the i_udiNumberOfCmdTables input a positive value according to the number of command tables is transferred in the list at the i_pstListOfCmdTables. |
Enumeration name: |
PointerCmdTableInvalid |
Enumeration value: |
36 |
Description: |
The pointer onto CmdTable is invalid. |
Issue |
Cause |
Solution |
---|---|---|
- |
An uninitialized pointer (0) was transferred at the i_pstCmdTable input. |
Make sure that at the i_pstCmdTable input a value greater than 0 is transferred which corresponds to the address of the command table with which the list shall be updated. |
Enumeration name: |
PointerListOfCmdTablesInvalid |
Enumeration value: |
33 |
Description: |
The pointer onto ListOfCmdTables is invalid. |
Issue |
Cause |
Solution |
---|---|---|
- |
An uninitialized pointer (0) was transferred at the i_pstListofCMDTables input. |
Make sure that at the i_pstListofCMDTables input a value greater than 0 is transferred which corresponds to the address of the list of command tables that shall be updated. |