FB_BACnet_EventMessageTextsProperty

FB_BACnet_EventMessageTextsProperty 1:

Application

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

Within the block, the property is decoded based on the string coding. The following property encodings are supported: UTF-8, UCS2, UCS4 and ISO8859-1. The output strings in the array arrTexts are Windows-1252-coded (see also FB_BACnet_StringExtDecode). If an error occurs during decoding of the property, this is indicated at the nErrorId output.

The 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 block (FB_BACnet_Device or FB_BACnet_RemoteDevice).

VAR_INPUT

tObjectID  : T_BACnet_ObjectIdentifier:=16#FFFFFFFF;
bAutoGet   : BOOL:=TRUE;
bGet       : 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.

 

VAR_OUPUT

bDone      : BOOL;
bBusy      : BOOL;
bError     : BOOL;
nErrorId   : UINT;
arrTexts   : ARRAY [0..2] OF T_MaxString;

 

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.

arrTexts: Message texts as Windows-1252-coded strings.

 

VAR_IN_OUT

stAdsConn      : ST_BACnet_AdsConnection;

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

 

Example

FB_BACnet_EventMessageTextsProperty 2:
Figure 1: Application example. Cyclic reading of the property Event_Message_Texts of a BACnet analog input object (AnalogInput: 10).