FB_DALIV2GetEventData
Filters out an event specified by the event scheme.
Each event sent by a DALI device contains two fields that provide information about the event source. These two fields are a combination of the short address, instance number, instance type, instance group or device group. The recipient of the event must know which address scheme is used to send the data.
For each event that is to be received and processed further, an instance of FB_DALIV2GetEventData() must be created and configured with the correct event scheme.
VAR_INPUT
bEnable : BOOL;
eEventScheme : E_DALIV2EventScheme := eDALIV2EventSchemeDeviceInstance;
nAddressInfo01 : BYTE;
nAddressInfo02 : BYTE;
bEnable: Enables the function block. If this input is set to FALSE, no further events are output.
eEventScheme: The event scheme defines the address information required for filtering the desired result.
nAddressInfo01: (see table below)
nAddressInfo02: (see table below)
eEventScheme | nAddressInfo01 | nAddressInfo02 |
---|---|---|
eDALIV2EventSchemeInstance | Instance type (0-31) | Instance number (0-31) |
eDALIV2EventSchemeDevice | Short address (0-63) | Instance type (0-31) |
eDALIV2EventSchemeDeviceInstance | Short address (0-63) | Instance number (0-31) |
eDALIV2EventSchemeDeviceGroup | Device group (0-31) | Instance type (0-31) |
eDALIV2EventSchemeInstanceGroup | Instance group (0-31) | Instance type (0-31) |
VAR_OUTPUT
bNewData : BOOL;
nEventInfo : WORD;
bNewData: If an event was received that corresponds to the event scheme and address information, this output is set to TRUE for one PLC cycle.
nEventInfo: If the output bNewData is TRUE, further information about the event can be found at this output. The exact meaning depends on the device type and is described in the respective Part 3xx of IEC 62386.
VAR_IN_OUT
stCommandBuffer : ST_DALIV2CommandBuffer;
stCommandBuffer: Reference to the internal structure for communication with the function block FB_KL6821Communication() (KL6821).
Requirements
Development environment | Target system | Required libraries |
---|---|---|
TwinCAT 2.11 R3/x64 from build 2260 | PC/CX, BX or BC | TcDALIV2 library from V2.12.0 |