Value duration (BValueDurationBlock)

This block determines how long the input has been at the current value. Both value and trend requests are supported.

A trend request results in values that reflect the duration of the current value within the trend. A trend request typically yields a sawtooth output, where the accumulated duration value resets to zero and each value in the trend data changes.

For a value request, the Search Limit property (defaults to 1 hour) defines the time range for the block to process a trend request and returns a single value that reflects the duration of the current value in the trend.

Figure 174.   Value Duration properties
Image

To view these properties, double-click the block on the Wire Sheet or the block name in the Nav tree.

Property Value Description
Out read-only value slot Outputs a constant value of constant trend from the Trend In property based on the value of the Make Trends or Makes Trends property.
Trend In required value slot Links from the output of other logic blocks or data sources to supply trend data to the current logic block.
Mode drop-down list defaults to Minutes (defaults to 1 hour) Configures what time unit (milliseconds, seconds, minutes or hours) to apply to the accumulated values.
Search Limit hours minutes seconds miliseconds (defaults to 1 hour) Defines how far back in time to search. The system subtracts this value from the current time to create a time range for value requests.
Makes Trends true or false (default) Controls the processing of trend requests.

false outputs a constant value for both value and trend requests.

true outputs a trend with constant values for trend requests.

Example

For a value request, the Search Limit property (defaults to 1 hour) defines the time range of data to query and the Mode property (defaults to Minutes) defines the time interval for the result. Consider an algorithm with a Value Duration Block configured with Mode = Hours and Search Limit = 24 hours.

Figure 175.   Value Duration Block algorithm
Image

The history for the hs:power data source shows the value has been 300 since 9:00 AM.

Figure 176.   Resulting data
Image

A Numeric Point for an analytic proxy extension configured with Data = alg:ValueDuration polled at 9:33 AM returns a result of 0.6 hours. The value of 300 has been the same since 9:00 AM; 33 minutes converted to hours is 0.6 hours.

Figure 177.   Numeric Point configuration
Image

Analytic charts and tables display the accumulated value duration times instead of the raw values from the data source history.

Figure 178.   Chart showing the accumulated value
Image

If the Value Duration Block needs to pass the results as a trend via the Out slot linked to a downstream block, change the Makes Trends property from its default, false, to true.