FB_BA_LogMessage

The function block FBBALogMessage is the concrete implementation of FB_BA_LogMessageItf and extends it with the interface I_SymbolPathPtr. This function block enables structured and reliable logging in the TwinCAT runtime with full support for Assertions and Show messages.
The function block stores the symbol path internally and automatically makes it available when messages are output via the ADS logging system. This allows for the unambiguous identification of the message source.
![]() | The function block automatically detects repeated identical log codes and suppresses their output to prevent the log file from becoming overloaded. This suppression can be manually lifted using the |
![]() | The symbol path is automatically initialized in the |
Inherits from: FB_BA_LogMessageItf
Implemented: I_SymbolPathPtr
Syntax
FUNCTION_BLOCK FB_BA_LogMessage EXTENDS FB_BA_LogMessageItf IMPLEMENTS I_SymbolPathPtr
Methods
Name | Definition location | Description |
|---|---|---|
Validates a condition and outputs an ERROR message (variants: Assert through Assert5). | ||
Outputs a message via the ADS logging system (variants: Show through Show5). | ||
Resets the blocking logic so that the next message is output. |
Properties
Name | Type | Access | Definition location | Description |
|---|---|---|---|---|
SymbolPathPtr | POINTER TO T_MaxString | Get | Local | Returns a pointer to the internally stored symbol path. |
