FB_BACnet_RecipientListProperty

 

FB_BACnet_RecipientListProperty 1:

 

Application

The function block can be used to read the property Recipient_List of any BACnet object (typically BACnet Notification Class Object). The input tObjectID specifies the object (Object_Identifier: object type and object instance) to be accessed. The Example shows a possible configuration.

The data to be read or written is stored in the same input/output data structure (see also ST_BACnet_RecipientListDevice).

The function block instance is created by the PLC program and called cyclically. The input/output stAdsConn must be linked to the output stAdsConn of the respective device function block (FB_BACnet_Device or FB_BACnet_RemoteDevice).

FB_BACnet_RecipientListProperty 2:

The ADS buffer from the global variables is used for buffering the ADS data (see ST_BACnet_GlobalAdsBuffer).

VAR_INPUT

tObjectID     : T_BACnet_ObjectIdentifier:=16#FFFFFFFF;
bAutoGet      : BOOL:=TRUE;
bGet          : BOOL;
bSet          : BOOL;

 

tObjectID: Specifies the object (Object_Identifier: object type and object instance) to be accessed.

bAutoGet: TRUE = the property is read automatically when the ADS connection or the Object_Identifier have changed. An ADS connection change occurs when the connection is restored after an interruption, or if the AMS NetID or port has changed. Automatic reading does not occur cyclically, and not if the property itself changes!

bGet: FALSETRUE = Property is read once, irrespective of input bAutoGet.

bSet : FALSE --> TRUE = property is written.

 

VAR_OUPUT

bDone         : BOOL;
bBusy         : BOOL;
bError        : BOOL;
nErrorId      : UINT;

 

bDone: Reading or writing of the data completed successfully. bDone set remains set until bGet, bSet and bAutoGet are reset, or until a new read or write operation starts. If bGet, bSet and bAutoGet are reset before bDone is active, bDone is set for one cycle.

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;
stRecipients  : ST_BACnet_RecipientListDevice;

 

stAdsConn: Linking to the output stAdsConn of the corresponding device function block.

stRecipients: Input/output data structure for the entries of the property Recipient_List. The following section compares an entry in the PLC and the TwinCAT System Manager (see Example).

Example 1: Comparison of PLC and System Manager

FB_BACnet_RecipientListProperty 3:
Figure 1: Example of a property entry in the PLC
FB_BACnet_RecipientListProperty 4:
Fig. 2: Example of a property entry in the TwinCAT System Manager

Example 2: Function block call

FB_BACnet_RecipientListProperty 5:
Fig. 3: Application example. Reading and writing of the property Recipient_List of a BACnet notification class object.