FB_BA_EventObject

FB_BA_EventObject 1:

The function block FB_BA_EventObject extends the basic functionalities of a BACnet object by the properties of the object-internal notification (Intrinsic Reporting). Here, notifications and alarm messages are generated by the BACnet object itself and forwarded to a notification class.

In this object the corresponding events must be enabled. This is done via the property Event_Enable. Each event (TO_OFFNORMAL, TO_FAULT and TO_NORMAL) can be enabled individually.

Inheritance hierarchy

FB_BA_Base

    FB_BA_BasePublisher

        FB_BA_Object

Illustration

FUNCTION_BLOCK ABSTRACT FB_BA_EventObject EXTENDS FB_BA_Object IMPLEMENTS I_BA_EventObject, I_BA_EventValue
VAR_OUTPUT
  bEvent                     : BOOL;
  eEventState                : E_BA_EventState;
END_VAR
VAR_INPUT CONSTANT PERSISTENT
  {region 'Variable Parameters'}
    bEventDetectionEnable    : BOOL := TRUE;
    nEventClassID            : UDINT;
    aEventTransitionText     : T_BA_EventTransitionText := BA_Param.aEventTransitionText;
  {endregion}
END_VAR
VAR_INPUT CONSTANT
  {region 'Operational Parameters'}
    bAcknowledgeRm           : BOOL;
  {endregion}
END_VAR
VAR
  {region 'Output-Properties'}
    eEventType               : E_BA_EventType := E_BA_EventType.Invalid;
    eAlarmMode               : E_BA_AlarmMode := E_BA_AlarmMode.Invalid;
    eReliability             : E_BA_Reliability;
    eEventTransition         : E_BA_EventTransition := E_BA_EventTransition.Invalid;
    {endregion}
END_VAR
VAR
  {region 'Event'}
    stStateFlags             : ST_BA_StatusFlags;
    stAckedTransitions       : ST_BA_EventTransitions;
    aEventEnable             : T_BA_EventTransitions;
  {endregion}
END_VAR

FB_BA_EventObject 2: Outputs

Name

Type

Description

bEvent

BOOL

The variable signals an abnormal event of an object.

The type of event, e.g. an alarm, a maintenance message, etc., is described within the event class associated with the object.

eEventState

E_BA_EventState

The variable describes the state of an event.

FB_BA_EventObject 3: Inputs CONSTANT PERSISTENT

Name

Type

Description

bEventDetectionEnable

BOOL

The variable indicates whether intrinsic reporting is enabled in the object. It must be TRUE to activate.

It controls whether the events are taken into account within further processing, e.g. in event lists.

nEventClassID

UDINT

This property specifies the instance of the event class to be used for event notification distribution (see Events)

aEventTransitionText

T_BA_EventTransitionText

The array contains three strings, which are the base for the message texts of the events

TO_OFFNORMAL,

TO_FAULT and

TO_NORMAL represent.

The message texts are stored in the list TxtEvent_EN or TxtEvent_DE. Depending on the language selection, the English or German text list is installed when TF8040 is installed.

The message texts are concatenated with other strings to a message in TF8040.

FB_BA_EventObject 4: Inputs CONSTANT

Name

Type

Description

bAcknowledgeRm

BOOL

Input for local acknowledgement of the events of an object.

VAR

Name

Type

Description

eEventType

E_BA_EventType

Event type.

eAlarmMode

E_BA_AlarmMode

Definition of how to deal with an alarm.

eReliability

E_BA_Reliability

This variable indicates whether the value of the Present_Value property is reliable (NO_FAULT_DETECTED), otherwise it represents the reason (e.g. short circuit, missing sensor, etc.).

eEventTransition

E_BA_EventTransition

Mapping of the BACnet data type BACnetEventTransitionBits.

stStateFlags

ST_BA_StatusFlags

Mapping of the BACnet property Status_Flags.

stAckedTransitions

ST_BA_EventTransitions

Mapping of the BACnet Properties Acked_Transitions.

aEventEnable

T_BA_EventTransitions

Inside the array there are three event-enable bits. This allows the detection of the TO_OFFNORMAL, TO_FAULT and TO_NORMAL state changes on the object to be selectively suppressed.

aEventEnable[1] = TO_OFFNORMAL

aEventEnable[2] = TO_FAULT

aEventEnable[3] = TO_NORMAL

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.35

Tc3_XBA from v5.3.0.0