Receiving alarms and events from other devices

This example shows the use of an Eventlog object as a receiver for alarms and events of an external BACnet device. The Eventlog object of the alarm receiver is entered in the notification class of the alarm transmitter. The assignment is made via the process identifier.

Device 1: Alarm transmitter

Variables

// Notification Class object in the alarm generating device
fbNC01 : FB_BACnet_NC := (
    nObjectInstance := 1,
    nNotificationClass := 1,
    sDescription := 'NC01',
    aAckRequired := [ TRUE, TRUE, TRUE ],
    aPriority := [ 224, 223, 222 ],
    aRecipientList :=
    [
        (
            stValidDays := (
                bMonday:=TRUE,
                bTuesday:=TRUE,
                bWednesday:=TRUE,
                bThursday:=TRUE,
                bFriday:=TRUE,
                bSaturday:=TRUE,
                bSunday:=TRUE
            ),
            stFromTime := F_BA_ToSTTime(T#0H),
            stToTime := F_BA_ToSTTime(T#23H59M59S),
            stRecipient := F_BACnet_DeviceRecipient(nDeviceInstance:=12345),
            nProcessId := 42,
            bIssueConfirmed := FALSE,
            stEventTransitions := (bToOffNormal:=TRUE, bToFault:=TRUE, bToNormal:=TRUE)
        )
    ]
);


Device 2: Alarm receiver (Device 12345)

Variables

fbELogBuf : FB_BACnet_ELogBuf := (
    sObjectName := 'Event Log for external alarms',
    bLogEnable := TRUE,
    nProcessId := 42
);