BACnet: The Trend Log Object

The Trend Log object is defined by the standard as a property monitor for a specific object. When certain conditions are reached, a log is produced with the property value and a date/time stamp which is placed into a buffer for future retrieval. This buffer can be optionally fixed in size by the developer.

The Trend Log object offers the developer two ways in which the value is logged:

  • Periodically
  • During a change in value

The log entry is referred to by the standard as a Trend Log Record. Other items included into the Trend Log Record:

  • Data Entry Error(s)
  • Logging Operational Status

The following table will present the actual properties and datatypes of the Trend Log object from the BACnet standard:

Property Datatype
Object_Identifier BACnet Object Identifier
Object_Name Character String
Object_Type BACnet Object Type
Description Character String
Log_Enable Boolean
Start_Time BACnet Date Time
Stop_Time BACnet Date Time
Log_Device Object Property BACnet Device Object Property Reference
Log_Interval Unsigned
COV_Resubscription_Interval Unsigned
Client_COV_Increment BACnet Client COV
Stop_When_Full Boolean
Buffer_Size Unsigned32
Log_Buffer List of BACnet Log Record
Record_Count Unsigned32
Total_Record_Count Unsigned32
Notification_Threshold Unsigned32
Records_Since_Notification Unsigned32
Last_Notify_Record Unsigned32
Event_State BACnet Event Event State
Notification_Class Unsigned
Event_Enable BACnet Event Transition Bits
Acked_Transitions BACnet Event Transition Bits
Notify_Type BACnet Notify Type
Event_Time_Stamps BACnet Array (3) of BACnet Time Stamp
Profile_Name Character String

The automation developer should pay close attention to the defined properties in the following list:

  • Log_Enable property – Enable/disable logging process.
  • Start_Time property – Start logging process on a specific date and time.
  • Stop_Time property – Stop logging process on a specific date and time.
  • Record_Count property – By indicating “0” will clear the buffer.
  • Log_Interval property – Specifies the logging interval.
  • Stop_When_Full property – Stop logging when the buffer is Full.
  • Buffer_Size property – Indicates the maximum number of records in the buffer.
  • Log_Buffer property – Details of the buffer itself.

The following example from the standard will present the Trend Log object structure from an actual automation application. This example will specifically focus on the record log of the air temperature in a certain room within a building:

Object_Identifier (Trend Log, Instance 1)
Object_Name “Room 3Log”
Object_Type TREND_LOG
Description “Room 3 Temperature”
Log_Enable TRUE
Log_DeviceObjectProperty ((Device, Instance 100), Analog Input, Instance 3, Present_Value)
Log_Interval 6,000
Stop_When_Full FALSE
Buffer_Size 250
Log_Buffer (((23-MAR-1998,12:32:33.0), 72.0,(FALSE,FALSE,FALSE,FALSE)),(23-MAR-1998,12:34:32.0),72.1,(FALSE,FALSE,FALSE,FALSE)),…)
Record_Count 250
Total_Record_Count 131040
Notification_Threshold 83
Records_Since_Notification 30
Last_Notify_Record 131010
Event_State NORMAL
Notification_Class 1
Event_Enable {FALSE, TRUE, TRUE}
Acked_Transitions {TRUE, TRUE, TRUE}
Notify_Type EVENT
Event_Time_Stamps ((23-MAR-95, 18:50:21.2),(*-*-*,*:*:*.*),(23-MAR-95, 19:01:34.0))

Written by: Scott Cosby

© Chipkin Automation Systems 2007