FB_DALIGetPowerCycleNotification

FB_DALIGetPowerCycleNotification 1:

The function block B_DALIGetPowerCycleNotification filters out all received Power Cycle Notification Events.

Each Power Cycle Notification Event sent by a DALI control device contains two fields that provide information about the event source. These two fields are the short address and the smallest group address to which the DALI control device belongs.

An instance of FB_DALIGetPowerCycleNotification must be created for each KL6821/EL6821 through which Power Cycle Notification Events are to be received and processed. If a Power Cycle Notification Event is detected, the output bNewData is set to TRUE for one PLC cycle. The two outputs nShortAddress and nLowestDeviceGroup provide information about the exact source of the event.

FB_DALIGetPowerCycleNotification 2:

The function block cannot be used when using the KL6811.

FB_DALIGetPowerCycleNotification 3: Inputs

VAR_INPUT
  bEnable       : BOOL;
END_VAR

Name

Type

Description

bEnable

BOOL

If this input is TRUE, all received Power Cycle Notification Events of the DALI control devices are output.

FB_DALIGetPowerCycleNotification 4: Outputs

VAR_OUTPUT
  bError                     : BOOL;
  ipResultMessage            : I_TcMessage;
  bNewData                   : BOOL;
  nShortAddress              : BYTE;
  nLowestDeviceGroup         : 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.

bNewData

BOOL

As soon as a Power Cycle Notification Event matches the desired filter criteria, this output is set to TRUE for one PLC cycle.

nShortAddress

BYTE

This output contains the short address (0…63) of the DALI control device that sent the Power Cycle Notification Event. If the DALI control device does not have a short address, 255 (MASK) is output.

nLowestDeviceGroup

BYTE

This output contains the lowest group address (0…31) of the DALI control device that sent the Power Cycle Notification Event. If the DALI control device is not assigned to a group, 255 (MASK) is output.

FB_DALIGetPowerCycleNotification 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