FB_BA_ComnMsgTermt

Formation of collective messages

FB_BA_ComnMsgTermt 1:

Functional description

The function blocks FB_BA_ComnMsg and FB_BA_ComnMsgTermt are used to form collective messages at the plant level and the controller level.

The information of the BACnet objects is transferred to the function blocks FB_BA_ComnMsg in the structure ST_BA_ComnMsg. The variables stOut are used to transfer the collective plant messages to the function block FB_BA_ComnMsgTermt. All messages of the BACnet objects of a BACnet controller are consolidated here.

FB_BA_ComnMsgTermt 2:

Error handling:

In the first cycle after a controller restart, each BACnet object reserves a field in a one-dimensional array within the message structure ST_BA_ComnMsg. The size of the array is defined with the global constant gBA_cMaxArrComnMsg. The default for this constant is 256. If more than 256 BACnet objects are connected to an instance of FB_BA_ComnMsg, it has to be increased. The transfer of messages to FB_BA_ComnMsgTermt is set to 64 within the structure ST_BA_ComnMsgTermt. For a higher number the constant gBA_cMaxArrComnMsgTermt has to be increased.

FB_BA_ComnMsgTermt 3:

Inputs/outputs

VAR_IN_OUT

stIn     : ST_BA_ComnMsgTermt;

stIn: Data structure for receiving collective messages from the plant level to function block FB_BA_ComnMsgTermt.

VAR_OUTPUT

bInAlm         : BOOL;
bFlt           : BOOL;
bOvrrd         : BOOL;
bOoServ        : BOOL;
bHiLmt         : BOOL;
bLoLmt         : BOOL;
udiHiActvPrio  : UDINT;
arrActvPrio    : ARRAY [1..16] OF BOOL;
iMaxNumOfEntry : INT;
iNumOfEntry    : INT;
dwObjId        : DWORD;
eObjType       : E_BACnetObjectType;
bErr           : BOOL;
udiErrId       : UDINT;
udiErrArg      : UDINT;

bInAlm: the last sending BACnet object is in alarm status.

bFlt: the last sending BACnet object is in fault status.

bOvrrd: in the last sending BACnet object, the local mechanical priority operation is enabled.

bOoServ: the last sending BACnet object is "out of service".

bHiLmt: in the last sending BACnet object the Hi limit is exceeded.

bLoLmt: in the last sending BACnet object the Lo limit is undershot.

udiHiActvPrio: indicates the highest written priority of all BACnet objects.

arrActvPrio: the array provides an overview of the active priorities of all connected BACnet objects.

iMaxNumOfEntry: indicates how many BACnet objects can be connected to the function block.

iNumOfEntry: indicates how many BACnet objects are connected to the function block.

eObjType: object type of the object that last entered the error state.

dwObjId: ID of the object that last entered the error state.

bErr: this output is switched to TRUE if the parameters entered are erroneous.

udiErrId / udiErrArg: contains the error number and the error argument. See error codes.

Requirements

Development environment

Target system

required library

required supplement

TwinCAT 2.11 R3/x64

PC/CX

TcBA library from V1.0.0

TS8040 | TwinCAT Building Automation from V1.0.0