FB_BACnet_NotificationSink

FB_BACnet_NotificationSink 1:

Application

Function block for realizing an ADS connection with a BACnet NotificationSink that was created in the TwinCAT System Manager:

FB_BACnet_NotificationSink 2:
Fig. 1: Notification sink in TwinCAT System Manager with open Settings dialog. "ADS Port" reflects the AMS port of the ADS connection.

The following blocks are available for accessing the NotificationSink:

Blocks

Description

FB_BACnet_NSinkReadEvent

ADS access to the BACnet notification sink: reading a BACnet event

FB_BACnet_NSinkAcknEvent

ADS access to the BACnet notification sink: service for acknowledging a BACnet event

FB_BACnet_NSinkRemoveEvent

ADS access to the BACnet notification sink: Deleting a BACnet event (replaces FB_BACnet_NotificationSinkDelEntry)

VAR_INPUT

bReload      : BOOL;
nAmsPort     : T_AmsPort:=0;

bReload: The ADS connection is refreshed. Subsequent blocks, which use the ADS connection, are also triggered.

nAmsPort: AMS port (Ads Port) through which the NotificationSink can be accessed (see TwinCAT System Manager → Settings dialog of the corresponding NotificationSink; see Figure 1). Values between 1000 and 65534 are valid. No check takes place. If the specified port is wrong or no assigned, the behavior may be unexpected, or ADS errors may occur in function blocks that use this connection.

VAR_OUPUT

bReady       : BOOL;
stBACnetAds  : ST_BACnet_AdsConnection;

bReady: The specified AMS port is in the valid range (1000 ≤ nAmsPort < 65535).

stBACnetAds: Structure with the connection data.