FB_DALIV2FileLogging

FB_DALIV2FileLogging 1:

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

FB_DALIV2FileLogging 2: Inputs

VAR_INPUT
  bStart    : BOOL;
  sPathName : STRING;
  sNetId    : STRING;
END_VAR

Name

Type

Description

bStart

BOOL

The function block is activated by a positive edge at this input.

sPathName

STRING

Contains the path and file name for the buffer file to be opened

sNetId

STRING

A string containing the network address of the TwinCAT computer where the buffer file is to be written or read can be specified here. For the local computer an empty string may be specified.

FB_DALIV2FileLogging 3:

sPathName: The path can only point to the local file system on the computer. This means that network paths cannot be specified here.

FB_DALIV2FileLogging 4: Inputs/outputs

VAR_IN_OUT
  fbStringRingBuffer : FB_MemRingBuffer;
END_VAR

Name

Type

Description

fbStringRingBuffer

FB_MemRingBuffer

Reference to the FIFO buffer in which the log entries are stored.

FB_DALIV2FileLogging 5: Outputs

VAR_OUT
  bBusy    : BOOL;
  bError   : BOOL;
  nErrorId : UDINT;
END_VAR

Name

Type

Description

bBusy

BOOL

When the function block is activated this output is set and remains set until the log buffer is cleared.

bError

BOOL

If an ADS error should occur during the transmission into the log file, then this output is set after the output bBusy has been reset.

nErrId

UDINT

Supplies the ADS error number or the command-specific error code (see error codes) when the output bError is set.

Requirements

Development Environment

PLC library to include

TwinCAT from v3.1.4020.14

Tc2_DALI from v3.4.3.0