DALI communication

These instructions and the DALI templates provided refer to the application with a KL6821 in conjunction with the library TC3_DALI.

Adding the library

Simply adding DALI-based templates to a project does not automatically include the required TC3_DALI library. This must be inserted manually:

DALI communication 1:

Right-click on "References" (1) and select "Add Library" (2). In the window that opens, select the library "TC3_DALI" (3) and confirm with "OK" (4).

Communication blocks and fast task

All DALI-based templates require the communication block FB_KL6821Communication, which runs in a fast communication task and establishes the connection to the DALI terminal to which the DALI line of the relevant device is connected.

The exact procedure can be found in the Beckhoff Information System within the description of the TC3_DALI.

One communication block must be instantiated for each DALI line. Once these have been inserted and called up in the fast task, they are available to the DALI-based templates.

Linking in the project

The data exchange between the communication block and the DALI-based templates takes place via an interface provided by the communication block. All DALI-based templates have implemented this interface as a parameter (VAR_INPUT CONSTANT PERSISTENT), so that only the respective communication block needs to be linked there in FB_Init.

Example:

Communication blocks are called up for 4 DALI lines in a fast task:

DALI communication 2:

DALI templates are then called up in a room template. These are pre-initialized in the FB_Init of the room template, including the link to the corresponding DALI communication block:

DALI communication 3: