FB_BACnet_ObjectListProperty

 

FB_BACnet_ObjectListProperty 1:

 

Application

The function block can be used to read the property Object_List of any BACnet device object (local or remote). The Example shows a possible configuration.

An object type filter can be used to limit the stObjIDList output.

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_ObjectListProperty 2:

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

FB_BACnet_ObjectListProperty 3:
Figure 1: Online view of the property Object_List

VAR_INPUT

bAutoGet     : BOOL:=TRUE;
bGet         : BOOL;
bTypeFilter  : BOOL;
eObjType     : E_BACnetObjectType;

 

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!

bTypeFilter: TRUE = output stObjIDList is limited to one BACnet object type; FALSE = all BACnet objects of the BACnet server (or client) are output.

eObjType: Filter of the BACnet object type to be output. If bTypeFitler = FALSE, the input is ignored.

 

VAR_OUPUT

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

 

bDone: Read of the data completed successfully. bDone remains set until to bGet and bAutoGet are reset or re-reading begins. If bGet 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.

stObjIDList: Structure with the number and list of the read BACnet object IDs (object type and object instance).

 

VAR_IN_OUT

stAdsConn    : ST_BACnet_AdsConnection;

 

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

 

Example

FB_BACnet_ObjectListProperty 4:
Fig. 2: Application example. Cyclic reading of property Object_List of a BACnet server (from the BACnet device object).