FB_DALIV2FileLogging

FB_DALIV2FileLogging 1:

This function block reads the respective FIFO buffers (IN-OUT variable fbStringRingBuffer) written in the function blocks FB_DALIV2EmergencyLightingFT() and FB_DALIV2EmergencyLightingDT() and writes the contents into a log file.

FB_DALIV2FileLogging 2:

This function block is available only in the PC version of the DALIV2 library.

VAR_INPUT

bStart         : BOOL;
sPathName      : STRING;
sNetId         : STRING;

bStart: the function block is activated by a positive edge on this input.

sPathName: contains the path and file name of the buffer file to be opened.
The path can only point to the local computer’s file system! This means that network paths cannot be used here!

sNetId: a string containing the network address of the TwinCAT computer where the buffer file is to be written or read can be given here. If it is to be run on the local computer, an empty string can be entered.

VAR_OUTPUT

bBusy        : BOOL;
bError       : BOOL;
nErrorId     : UDINT;

bBusy: This output remains TRUE until the Function-block has emptied the log-buffer

bError: This output is switched to TRUE if an error occurs during the execution of a command. The command-specific error code is contained in ‘nErrId’.

nErrorId: Contains the command-specific ADS error code of the most recently executed command.

VAR_IN_OUT

fbStringRingBuffer   : FB_MemRingBuffer;

fbStringRingBuffer: Reference to the FIFO-Buffer, in which the log-entries are put.

A sample-program shows the correct assignment of the inputs as well as the link to the logger-FB FB_DALIV2FileLogging. The appearance of the log-files is shown under the description of the function-blocks FB_DALIV2EmergencyLightingDT() and FB_DALIV2EmergencyLightingFT().