FB_DALIV2GetEventData
The function block 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.
Inputs
VAR_INPUT
bEnable : BOOL;
eEventScheme : E_DALIV2EventScheme := eDALIV2EventSchemeDeviceInstance;
nAddressInfo01 : BYTE;
nAddressInfo02 : BYTE;
END_VAR
Name | Type | Description |
---|---|---|
bEnable | BOOL | Enables the function block. If this input is set to FALSE, no further events are output. |
eEventScheme | E_DALIV2EventScheme | The event scheme defines the address information required for filtering the desired event. |
nAddressInfo01 | BYTE | (see table below) |
nAddressInfo02 | BYTE | (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) |
Inputs/outputs
VAR_IN_OUT
stCommandBuffer : ST_DALIV2CommandBuffer;
END_VAR
Name | Type | Description |
---|---|---|
stCommandBuffer | ST_DALIV2CommandBuffer | Reference to the internal structure for communication with FB_KL6821Communication (KL6821). |
Outputs
VAR_OUTPUT
bNewData : BOOL;
nEventInfo : WORD;
END_VAR
Name | Type | Description |
---|---|---|
bNewData |
BOOL |
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 |
BOOL |
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. |
Requirements
Development Environment | PLC library to include |
---|---|
TwinCAT from v3.1.4020.14 | Tc2_DALI from v3.4.3.0 |