MC_AxRtLoggerRead_BkPlcMc (from V3.0)

MC_AxRtLoggerRead_BkPlcMc (from V3.0) 1:

The function block reads a message from the LogBuffer of the library. Further information about creating a log buffer can be found under FAQ #10 in the Knowledge Base.

MC_AxRtLoggerRead_BkPlcMc (from V3.0) 2:

This function block is used by diagnostics tools via ADS. A direct call from the PLC application generally makes no sense.

MC_AxRtLoggerRead_BkPlcMc (from V3.0) 3: Inputs/outputs

VAR_INOUT
    Entry:      INT:=0;
    pBuffer:    POINTER TO ST_TcPlcMcLogBuffer;
    pEntry:     POINTER TO ST_TcPlcMcLogEntry;
END_VAR

Name

Type

Description

Entry

INT

The number of the message to be read.

pBuffer

POINTER 

Here the address of a variable of type ST_TcPlcMcLogBuffer is to be transferred.

pEntry

POINTER 

Here, the address of a variable of type ST_TcPlcMcLogEntry should be transferred as target.

MC_AxRtLoggerRead_BkPlcMc (from V3.0) 4: Outputs

VAR_OUTPUT
    Result:     DWORD:=0;
END_VAR

Name

Type

Description

Result

DWORD

Here, a coded cause of error is provided.

Behavior of the function block

The function block checks the transferred input values with each call. Two problems can be detected during this process:

If no problem was detected during the check, the function block copies the message selected by Entry from the LogBuffer pBuffer into the message structure addressed with pEntry. Entry is understood as a relative age specification: Entry:=1 selects the last message entered, Entry:=2 the next older one, etc. If the required message is not available, an empty message is provided.