FB_DALIV2EmergencyLightingFT

FB_DALIV2EmergencyLightingFT 1:

The function block FB_DALIV2EmergencyLightingFT is used for the function test of a DALI emergency lighting device. At the end of the test, the test results are written to a FIFO buffer (IN-OUT variable fbStringRingBuffer), which in turn is read into a file by the function block FB_DALIV2FileLogging. Events that hinder or interrupt the test are displayed in addition to the result message at the bError and nErrorID outputs.

The following events prevent the execution of a function test:

The events that interrupt a function test that has begun include:

FB_DALIV2EmergencyLightingFT 2: Inputs

VAR_INPUT
  bStart       : BOOL;
  nAddr        : BYTE;
  sController  : STRING(20);
  sLineName    : STRING(10);
  sDescription : STRING(20);
  sLocation    : STRING(20);
  stDateTime   : TIMESTRUCT;
  tTimeout     : TIME := t#120m;
END_VAR

Name

Type

Description

bStart

BOOL

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

nAddr

BYTE

Address of the device to be tested

sController

STRING

Controller to which the DALI device belongs. Serves the description in the log file.

sLineName

STRING

Line to which the DALI device belongs. Serves the description in the log file.

sDescription

STRING

Further supplementary description of the device in the log file

sLocation

STRING

Description of the installation location

stDateTime

TIMESTRUCT

Input for current date and time

tTimeout

TIME

Time within which the test must be completed.

FB_DALIV2EmergencyLightingFT 3: Inputs/outputs

VAR_IN_OUT
  stCommandBuffer    : ST_DALIV2CommandBuffer;
  fbStringRingBuffer : FB_MemRingBuffer;
END_VAR

Name

Type

Description

stCommandBuffer

ST_DALIV2CommandBuffer

Reference to the internal structure for communication with FB_KL6811Communication (KL6811) or FB_KL6821Communication (KL6821).

fbStringRingBuffer

FB_MemRingBuffer

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

FB_DALIV2EmergencyLightingFT 4:

It is not possible for the log function block to write data to a file as long as that file is open.

FB_DALIV2EmergencyLightingFT 5: Outputs

VAR_INPUT
  tElapsedTestTime : TIME;
  nEmergencyMode   : BYTE;
  nEmergencyStatus : BYTE;
  bBusy            : BOOL;
  bError           : BOOL;
  nErrorId         : UDINT;
END_VAR

Name

Type

Description

tElapsedTestTime

TIME

Test duration. The time output is set to 0 by a rising edge at bStart and then counts up as long as the function block is active. With a falling edge at bBusy, the output retains its current value so that the test duration is still available even after the function block has been processed.

nEmergencyMode

BYTE

During the test, the presently internally queried emergency mode of the DALI device is output at this output.

nEmergencyStatus

BYTE

the same applies to emergency status

bBusy

BOOL

When the function block is activated the output is set, and it remains active until execution of the command has been completed.

bError

BOOL

This output is switched to TRUE if an error, as described above, occurs during the execution of the test. This output is reset on restarting a test.

nErrorId

UDINT

Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of a command at the inputs (see error codes).

Requirements

Development Environment

PLC library to include

TwinCAT from v3.1.4020.14

Tc2_DALI from v3.4.3.0