FB_DALI103Addressing

FB_DALI103Addressing 1:

This function block addresses the DALI control devices at random. The user has no influence on which control device is assigned which short address. Short addresses are allocated in ascending order.

Applying a positive edge to the bStart input starts the function block, and the bBusy output goes TRUE. The terminal now addresses all DALI control devices independently. Once all DALI control devices have been addressed, the bBusy output goes back to FALSE. The output variable nAddressedDevices provides information on how many DALI control devices were assigned a short address. Depending on how many DALI control devices are connected, processing of this function block can take several minutes.

FB_DALI103Addressing 2:

The function block cannot be used when using the KL6811.

FB_DALI103Addressing 3: Inputs

VAR_INPUT
  bStart                  : BOOL;
  nStartWithShortAddress  : BYTE := 0;
  nOptions                : DWORD := Tc3_DALI.GVL.cOpticalFeedback;
END_VAR

Name

Type

Description

bStart

BOOL

Execution of the DALI commands is triggered via a positive edge at this input.

nStartWithShortAddress

BYTE

Short address assigned to the first DALI control device (0…63).

nOptions

DWORD

Options for addressing the DALI control devices (see table below). The individual constants must be linked with OR operators.

Constant

Description

Tc3_DALI.GVL.cCompleteNewInstallation

All DALI control devices are readdressed, even those that already have a short address.

Tc3_DALI.GVL.cOpticalFeedback

Newly addressed DALI control devices are allocated the DALI command IDENTIFY DEVICE once the short address has been assigned.

FB_DALI103Addressing 4: Outputs

VAR_OUTPUT
  bError                : BOOL;
  ipResultMessage       : I_TcMessage;
  bBusy                 : BOOL;
  nAddressedDevices     : BYTE;
END_VAR

Name

Type

Description

bError

BOOL

This output is switched to TRUE if an error occurs during the execution. Further information about the error can be queried via the variable ipResultMessage. The output is set to FALSE again as soon as bBusy switches to TRUE.

ipResultMessage

I_TcMessage

Interface pointer (see error evaluation) that can be used to obtain detailed information about the processing of the function block (see runtime messages). The interface pointer is valid after bBusy has changed from TRUE to FALSE.

bBusy

BOOL

The output is set as soon as execution of the DALI commands has commenced. It remains active until all DALI commands have been processed.

nAddressedDevices

BYTE

If addressing has been completed (bBusy is FALSE), then the number of addressed DALI control devices is shown at this output.

FB_DALI103Addressing 5: Properties

Name

Type

Access

Initial value

Description

ipDALICommunication

I_DALICommunication

Get,Set

0

Interface Pointer to the communication block (see Transfer of the reference to the communication block).

Requirements

Development environment

required PLC library

TwinCAT from v3.1.4022.29

Tc3_DALI from v3.1.4.0