Example: NotificationClass and NotificationSink

The following is an example of using the NotificationClass in conjunction with a NotificationSink. This "collects" the events of 3 objects (BV, AV, MV) and sends them to the local process 10 (NotificationSink) of the local BACnet device (event notification by intrinsic reporting).

In addition the PresentValue of the AnalogValue object should be sent to the NotificationSink if the value changes by 0.1 (COV notification).

Example: NotificationClass and NotificationSink 1: The example demoeventnclassnsink.zip can be downloaded here . The included TSM file can be used for testing purposes without loading the PLC.

Example: NotificationClass and NotificationSink 2:
Figure 1: Schematic diagram of an NotificationClass example configuration, its event-generating objects (AV, MV, BV) and the NotificationSink.

The objects are configured via the declaration in the PLC program:

VAR
 viewDummy : BOOL; (* ~( BACnet_StructuredViewPath : \/DemoNClass : ) *)

 fbDevice : FB_BACnet_Device;

 fbBV_0 : FB_BACnet_BinaryValue;
  (* ~(BACnet_ObjectIdentifier : 0 : nolink )
  (BACnet_EventEnable : {to_offnormal;to_fault;to_normal} : nolink )
  (BACnet_ActiveText : EIN : nolink )
  (BACnet_InactiveText : AUS : nolink )
  (BACnet_NotificationClass : 10 : nolink ) *)

 fbAV_0 : FB_BACnet_AnalogValue;
  (* ~(BACnet_ObjectIdentifier : 0 : nolink )
  (BACnet_EventEnable : {to_offnormal;to_fault;to_normal} : nolink )
  (BACnet_NotificationClass : 10 : nolink ) *)

 fbMV_0 : FB_BACnet_MultiStateValue;
  (* ~(BACnet_ObjectIdentifier : 0 : nolink )
  (BACnet_EventEnable : {to_offnormal;to_fault;to_normal} : nolink )
  (BACnet_NotificationClass : 10 : nolink )
  (BACnet_NumberOfStates : 5 : nolink )
  (BACnet_StateText : ErrLow;WarnLow;Normal;WarnHigh;ErrHigh : nolink )
  (BACnet_FaultValues : 1;5 : nolink )
  (BACnet_AlarmValues : 2;4 : nolink )
  (BACnet_Description : MV DEMO Objekt. : nolink ) *)

 fbNC_10 : FB_BACnet_NotificationClass;
  (* ~(BACnet_ObjectIdentifier : 10 : nolink )
  (BACnet_Priority : 70;80;90 : nolink )
  (BACnet_AckRequired : {to_offnormal;to_fault;to_normal} : nolink )
  (BACnet_RecipientList :
      <ArrayOfBACnetDestination>
    <BACnetDestination>
      <recipient>
        <choice>device</choice>
        <BACnetObjectIdentifier>
          <objId>33661729</objId>
        </BACnetObjectIdentifier>
      </recipient>
      <validDays>65025</validDays>
      <fromTime>
        <hour>0</hour>
        <minute>0</minute>
        <second>0</second>
        <hundredths>0</hundredths>
      </fromTime>
      <toTime>
        <hour>23</hour>
        <minute>59</minute>
        <second>59</second>
        <hundredths>99</hundredths>
      </toTime>
      <processIdentifier>10</processIdentifier>
      <transitions>57349</transitions>
      <issueConfirmedNotifications>false</issueConfirmedNotifications>
    </BACnetDestination>
      </ArrayOfBACnetDestination>
  : nolink ) *)END_VAR

The NotificationSink added for receiving the events is configured in the System Manager: NotificationSink

Example: NotificationClass and NotificationSink 3:
Figure 2: NotificationSink in the System Manager tree view
Example: NotificationClass and NotificationSink 4:
Figure 3: NotificationSink configuration in the System Manager

Process ID: The process ID is set to 10 and reported to the NotificationClass as a receive process (via PLC automapping comment).

COV Subscriptions: As an example the PresentValue of the AnalogValue object (AV:0) is subscribed to. The parameter covIncrement specifies the change of value threshold at which a COV notification is sent.

The following entries are displayed in the Online tab, once the configuration has been loaded and the values of the respective objects have been modified: NotificationSink PresentValue

Example: NotificationClass and NotificationSink 5:
Figure 4: NotificationSink online data after COV and event notifications have been received.
Example: NotificationClass and NotificationSink 6:

The text under messageText is formed from the property description of the event-generating object.