FB_BA_LogMessageItf

The FB_BA_LogMessageItf function block provides an interface for structured logging of messages in the TwinCAT runtime. It combines assertion and show methods with various parameter variations to enable flexible error and message handling.
The function block internally manages a code hash to block repeated identical messages within short time periods, in order to protect the log file from being flooded. This suppression can be manually reset using the Reset() method.
![]() | The function block requires implementation of the ISymbolPathPtr_interface in order to include the current symbol path in the log output. This helps with error identification and error handling. |
![]() | All messages can optionally be assigned a log code (_sLogCode_) to uniquely identify and categorize them. |
Syntax
FUNCTION_BLOCK FB_BA_LogMessageItf
VAR_INPUT
iSymPath : I_SymbolPathPtr;
END_VAR
Inputs
Name | Type | Description |
|---|---|---|
iSymPath | Reference to the current instance of the symbol path function |

Methods