FB_IEC870_DebugLogFifo
This function block is a FIFO for status/debugging/error messages. In the default setting, the oldest entry keeps being overwritten. The FIFO has a constant internal buffer size. The size is determined by the constant: MAX_IEC870_DEBUGLOG_FIFOSIZE (default: 10000 bytes).
The function block features the following tasks:
- A_Add (adds a new message to the FIFO);
- A_Remove (removes the oldest message from the FIFO);
- A_reset (clears all messages, resets the FIFO);
- A_LogHint (adds a new message to the FIFO and also writes this message as a note in the TwinCAT XAE->"Error List" window);
- A_LogWarning (adds a new message to the FIFO and also writes this message as a warning in the TwinCAT XAE->"Error List" window);
- A_LogError (adds a new message to the FIFO and also writes this message as an error in the TwinCAT XAE->"Error List" window);
VAR_INPUT
VAR_INPUT
sPrefix : STRING;
sPut : T_MaxString;
bOverwrite : BOOL := TRUE;
END_VAR
sPrefix: Additional message prefix.
sPut: Message to be added to the FIFO.
bOverwrite: TRUE => the oldest entries are overwritten, FALSE => the oldest entries are not overwritten.
VAR_OUTPUT
VAR_OUTPUT
bOk : BOOL;
sGet : T_MaxString;
nCount : UDINT;
cbFree : UDINT;
END_VAR
bOk: This variable becomes TRUE if a new entry was successfully added to or removed from the FIFO. This variable becomes FALSE on buffer overflow (overwriting of oldest entries disabled).
sGet: Message to be removed from the FIFO.
nCount: Number of current fifo entries.
cbFree : Number of free FIFO data bytes.
Requirements
Development environment |
Target system type |
PLC libraries to be linked (category group) |
---|---|---|
TwinCAT v3.1.4012.0 |
PC oder CX (x86, x64, ARM) |
Tc2_IEC60870_5_10x (Communication->IEC60870) |