Prewarning limits
With the help of the EventEnrollment object BACnet allows the monitoring of properties from BACnet objects. A typical application in building automation is prewarning limits, which draw attention to an alarm that may follow later.
The following example shows how the object-internal alarm detection (Instrinsic Reporting) is combined with an additional pair of prewarning limits (Algorithmic Change Reporting) and how these states (prewarning and alarm) can be reported via two different Notification Class objects.
Here, the BACnet object fbAV
, whose Present Value is specified from the REAL variable fRealValue, serves as the trigger for the warnings and alarms.
Variables
fRealValue : REAL := 50;
// Analog Value object using Intrinsic Reporting
fbAv : FB_BACnet_AV := (
sObjectName := 'AV using Intr. Reporting',
aEventEnable := [ TRUE, TRUE, TRUE ],
eNotifyType := E_BACnet_NotifyType.eAlarm,
bLowLimitEnable := TRUE,
fLowLimit := 15.0,
bHighLimitEnable := TRUE,
fHighLimit := 87.0,
fDeadband := 3,
nTimeDelay := 2, // waits 2 seconds before TO_OFFNORMAL
nTimeDelayNormal := 4, // wait 4 seconds before TO_NORMAL
bEventDetectionEnable := TRUE,
nNotificationClass := 10, // alarm class
aEventMessageTextsConfig := [ 'Alarm', 'Fault', 'Warning' ],
bEnPgm := TRUE,
eUnit := E_BA_Unit.eOther_Percent
);
// Additional warning limits using Algorithmic Change Reporting
fbEE : FB_BACnet_EE := (
sObjectName := 'Event Enrollment',
nNotificationClass := 20,
eNotifyType := E_BACnet_NotifyType.eNotifyEvent,
aEventEnable := [ TRUE, TRUE, TRUE ],
aEventMessageTextsConfig := [ 'Warning', 'Fault', 'Normal' ],
stEventParameter := (
eEventType := E_BACnet_EventType.eOutOfRange,
stEventArgs := (
stOutOfRange := (
nTimeDelay := 0,
fLowLimit := 25.0,
fHighLimit := 82.0,
fDeadband := 0.0
)
)
),
stObjectPropertyReference := F_BACnet_Reference(fbAv,PropPresentValue)
);
// Notification Classes 10=alarms, 20=warnings
fbNC10 : FB_BACnet_NC := (
sObjectName := 'NC10',
sDescription := 'Alarms',
nObjectInstance := 10,
nNotificationClass := 10,
aAckRequired := [ TRUE, TRUE, TRUE ],
aPriority := [ 10, 11, 12 ]
);
fbNC20 : FB_BACnet_NC := (
sObjectName := 'NC20',
sDescription := 'Warnings',
nObjectInstance := 20,
nNotificationClass := 20,
aAckRequired := [ FALSE, TRUE, FALSE ],
aPriority := [ 100, 110, 120 ]
);
Code
fbAv.fValPgm := fRealValue;
fbAv();
fbEE();
fbNC10();
fbNC20();