Error codes overview
The function blocks of the Tc2_MDP library have an nErrID output. This value is 4 bytes in size and returns the error code in the event of an error. nErrID is comprised of two parts:
Error Group | Error Code |
---|---|
0x EC80 | |
0x ECA6 | |
0x ECA7 | |
0x ECA8 | |
0x ECAF |
The function block FB_MDP_SplitErrorID enables the automatic separation of the variable nErrID into error group and error code.
Error Group
The fault group describes the type of error that has occurred. The different groups are listed in the enumeration E_MDP_ErrGroup.
All errors generated within the PLC library have the error group 0xEC80.
Error Code
The error code describes the specific error.
For errors within the PLC library with the error group 0xEC80, the identifiers are listed in the enumeration E_MDP_ErrCodesPLC. A description of the other error codes can be found in the documentation of the IPC diagnostics in the section on error messages.
General MDP-dependent errors are output in the error group 16#ECA6 “General error codes”. These errors sometimes indicate that an element from the module element list is not available. Example: 16#ECA60105 "No data available" If, in the case of a general or specific function block (see access options), several elements are queried at the same time and one of these elements is not available or exhibits an error, then the output variable iErrPos indicates the index position (0..n) at which the error occurred for the first time. All elements below this index were queried successfully and are indicated despite the generation of an error at the output. |
Example:
nErrID = 0x ECA8 0745
The error group is 0x ECA8, therefore it is an Ads error.
The error code is 0x 0745, therefore it is a timeout error.
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1.0 | PC or CX (x86, x64, ARM) | Tc2_MDP |