Reading trends

The BACnet driver supports the reading of log buffers from TrendLog and TrendLogMultiple objects. Reading takes place via the Log_Buffer property address. If this address is read (e.g. via SingleQuery), a ReadRange is executed.

It is also possible to configure the automatic reading of log buffers via BUFFER_READY notification. To do this, the BACnet driver must be configured as a recipient in the corresponding notification class for the TrendLog or TrendLogMultiple object.

For TrendLogMultiple objects, there is a Log_Buffer property in which several properties of different types can be trended. This means that several DPEs are required to map the data. The trend property for the DPE is selected via the array index in the peripheral address. This means that if, for example, the TrendLogMultiple trends the properties AnalogInput.1.Present_Value and BinaryInput.3.Present_Value, then array index 0 of Log_Buffer contains the first and array index 1 the second trended property.

Log Status Mapping

There are entries in BACnet trend logs that only contain the status and no values. For example, there may be a LOG_INTERRUPTED or LOG_PURGED entry. This information can be mapped to a UserByte by using the configuration entry [bacnet] userByteLogStatus. If the LogStatus is mapped the following information is contained in the UserByte:

As an artificial value is saved with the LogStatus, the value is also marked as invalid.

Mapping to Trended Property Address

At the beginning of this section it is mentioned that the Log_Buffer property is used to receive the trended data. There is also the possibility to map the trended data to the peripheral address of the trended property. This can be done either normal or as correction values. The latter is necessary if the trended property receive values also by other mechanism (e.g. COV). Otherwise there will be invalid timestamps.

The mapping to trended property address can be enabled by setting the config entry [bacnet] userBitTrendLog to a nonzero value.

If the values shall be written as correction values the additional config entry [all drivers] histDataBits must be set to the used user bit