Supported platforms: CODESYS 3.5, CODESYS 3.5 SAFETY
These functions add new error log line. The <type> represents the data type of additional
info inputs. In safety related application the error log lines can be added from
safety or non-safety code.
Different type of interfaces is provided to minimize the need for intermediate variables
in application.
Error log line (see Data Types) includes two error codes and 8 bytes of additional information. Library
implements functions for giving additional info in DWORD or BYTE format.
New log line is added on following conditions:
Log has been initialized successfully
i_ErrorCode input is not zero
i_LibraryErrorCode is not zero
Log is not full (log line count is defined by library parameter)
Same error is not found in log (both error codes and additional info are checked)
Zero error code is interpreted as OK.
Log contains errors in activation order and only first instance of each error.
The additional info is extracted to log line’s infos array in following order:
Function |
infos [1] |
infos [2] |
infos [3] |
infos [4] |
infos [5] |
infos [6] |
infos [7] |
infos [8] |
S_AddError_BYTE |
i_Info1 |
i_Info2 |
i_Info3 |
i_Info4 |
i_Info5 |
i_Info6 |
i_Info7 |
i_Info8 |
S_AddError_DWORD |
i_Info1 MSB |
|
|
i_Info1 LSB |
i_Info2 MSB |
|
|
i_Info2 LSB |
MultiTool Creator S Series code template uses these functions for logging code template errors. |
Error code list is defined by code template. |
In safety related application the error log lines can be added from safety or non-safety code. |
Input variable name |
Data type |
Description |
i_ErrorCode |
DINT |
Main error code identifies the source of error |
i_LibraryErrorCode |
DINT |
Error specific code, typically return value or error output of the functionality causing error |
i_Info1 |
BYTE |
Error specific additional information |
i_Info2 |
BYTE |
Error specific additional information |
i_Info3 |
BYTE |
Error specific additional information |
i_Info4 |
BYTE |
Error specific additional information |
i_Info5 |
BYTE |
Error specific additional information |
i_Info6 |
BYTE |
Error specific additional information |
i_Info7 |
BYTE |
Error specific additional information |
i_Info8 |
BYTE |
Error specific additional information |
Input variable name |
Data type |
Description |
i_ErrorCode |
DINT |
Main error code identifies the source of error |
i_LibraryErrorCode |
DINT |
Error specific code, typically return value or error output of the functionality causing error |
i_Info1 |
DWORD |
Error specific additional information |
i_Info2 |
DWORD |
Error specific additional information |
Data type |
Description |
BOOL |
TRUE if new error log line has been added, otherwise FALSE |
No errors.
MultiTool Creator S Series code template uses these functions automatically. |
Source file topic100590.htm
Last updated 19-Dec-2024