Supported platforms: CODESYS 3.5, CODESYS 3.5 SAFETY

 

How to use error diagnostics

This section describes basic principles of safety library error diagnostics.

 

The following image shows how safety library POUs set and reset errors and output valid state.

Error diagnostic behavior depends on the POU's i_Enable input state.

 

Error status outputs

Each safety library defines the Status structure to be used by the safety library function blocks. The Status structure contains error booleans for all POUs implemented in a single safety library.

 

All public safety library function blocks have an o_Status output of the library’s own Status structure type. Refer to each function block's documentation for error diagnostic details. The library functions do not have status structure output, but separate status boolean variables (e.g. o_OutputValid, o_ParameterError, etc.).

 

If a library POU detects an error, it sets the corresponding error status bit to TRUE only when the  i_Enable input is TRUE.

Value errors (high/low/mismatch) have delayed activation, unless separately mentioned otherwise.

 

Erroneous input parameters in a function block's Init method or main input interface of a function block/function causes a parameter error. This error is set without a delay. In case of a parameter error, all other error statuses are reset.

 

All POUs (except functions) have an output variable named OutputValid in o_Status structure. Functions have an output named o_OutputValid. The status is TRUE when i_Enable is TRUE and no error is active, otherwise the status is always FALSE.

 

When a POU detects any error, any output variables that are SAFE variable type are set to the given safe value/state. For function block instances, the safe value is given in the Init method. If a safe value/state is not given, value zero/state FALSE is used.

 

 

Source file topic100375.htm

Last updated 19-Dec-2024