FB_DALIGetInputNotification
The function block filters all received Input Notification Events according to certain filter criteria.
Each Input Notification contains the address of the sender and further information about the event (output nEventInfo).
The address of the sender consists of two fields. The meaning of these fields is defined in the DALI control device by the event scheme (see E_DALIEventScheme). The function block FB_DALI103QueryEventScheme can be used to read the value of the event scheme; the function block FB_DALI103SetEventScheme can be used to write to it. The two fields are a combination of the short address, instance number, instance type, instance group or device group.
The source of the Input Notification is defined by the inputs eEventScheme, nAddressInfo1 and nAddressInfo2. As soon as an Input Notification is received from this source, the output bNewData is set and the event information is output on the output nEventInfo.
For each Input Notification Event, which is to be received and processed further, an instance of FB_DALIGetInputNotification must be created and configured with the correct filter criteria.
Moreover, this information can also be obtained at runtime with the help of the TwinCAT Communication Monitor extension.
The function block cannot be used when using the KL6811. |
Inputs
VAR_INPUT
bEnable : BOOL;
eEventScheme : E_DALIEventScheme := E_DALIEventScheme.DeviceInstance;
nAddressInfo1 : BYTE;
nAddressInfo2 : BYTE;
END_VAR
Name | Type | Description |
---|---|---|
bEnable | BOOL | If this input is TRUE, all received Input Notification Events of the DALI control devices are output according to the specified filter criteria. The filter criteria are defined by the inputs eEventScheme, nAddressInfo1 and nAddressInfo2. |
eEventScheme | This input specifies the event scheme that the expected event must have. The event scheme also determines the meaning of the two inputs nAddressInfo1 and nAddressInfo2. | |
nAddressInfo1, nAddressInfo2 | BYTE | see table below |
eEventScheme | nAddressInfo1 | nAddressInfo2 |
---|---|---|
E_DALIEventScheme.Instance | Instance type (0…31) | Instance number (0..31) |
E_DALIEventScheme.Device | Short address (0…63) | Instance type (0…31) |
E_DALIEventScheme.DeviceInstance | Short address (0…63) | Instance number (0…31) |
E_DALIEventScheme.DeviceGroup | Device group (0…31) | Instance type (0…31) |
E_DALIEventScheme.InstanceGroup | Instance group (0…31) | Instance type (0…31) |
Outputs
VAR_OUTPUT
bError : BOOL;
ipResultMessage : I_TcMessage;
bNewData : BOOL;
nEventInfo : WORD;
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 Input Notification Event matches the desired filter criteria, this output is set to TRUE for one PLC cycle. |
nEventInfo | WORD | 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. |
The possible values of the events for the respective instance types can be found here:
Part 301 (push buttons) - Input Notification
Part 302 (absolute input devices) - Input Notification
Part 303 (occupancy sensors) - Input Notification
Part 304 (light sensors) - Input Notification
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 |