Supported platforms: CODESYS 3.5, CODESYS 3.5 SAFETY

 

S_AddError_<type> (FUN)

Description

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.

 

Operation

New log line is added on following conditions:

 

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

 

Limitations

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.

 

Inputs <BYTE>

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

Inputs <DWORD>

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

Return value

Data type

Description

BOOL

TRUE if new error log line has been added, otherwise FALSE

Errors

No errors.

 

Example code

MultiTool Creator S Series code template uses these functions automatically.

 

See also

 

 

Source file topic100590.htm

Last updated 19-Dec-2024