FB_IEC870_DebugLogFifo

FB_IEC870_DebugLogFifo 1:

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:

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)
Tc2_SerialCom (Communication->Serial)
Tc2_TcpIp (Communication->TcpIp)
Tc2_Utilities (System)