FB_BACnet_NSinkRemoveEvent
Application
The function block can be used to delete any entry from the BACnet Notification Sink. The Example shows a possible configuration.
The input to be deleted is selected at input nIndex. The numbering matches the order in the buffer of the Notification Sink. In a ring buffer the numbering of incoming events starts at 0, in the event of a buffer overflow.
The block instance is created by the PLC program and called cyclically. The input/output stAdsConn must be linked to the output stBACnetAds of the corresponding NotificationSink function block (FB_BACnet_NotificationSink).
VAR_INPUT
bRemove : BOOL;
nIndex : UDINT;
bRemove: FALSE → TRUE = event entry is deleted.
nIndex: Index of the event entry to be deleted (0 to n).
VAR_OUPUT
bDone : BOOL;
bNoEntry : BOOL;
bBusy : BOOL;
bError : BOOL;
nErrorId : UINT;
bDone: Read of the data completed successfully. bDone remains set until bRemove is reset. If bRemove is reset before bDone is active, bDone is set for one cycle.
bNoEntry: No entry for deletion exists - event entry under nIndex is empty. bNoEntry remains set until a new delete operation starts. The output is used to detect the end of the event list.
bBusy: The block is busy.
bError: Error during processing.
nErrorId: Error code, see BACnet_Globals for an overview.
VAR_IN_OUT
stAdsConn : ST_BACnet_AdsConnection;
stAdsConn: Linking to the output stBACnetAds of the corresponding NotificationSink function block.
Example: Function block call
The AMS port depends on the TwinCAT System Manager configuration of the corresponding BACnet device (see FB_BACnet_NotificationSink). |