Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Historian

DURATION (time in state)

  • Last UpdatedMar 20, 2025
  • 1 minute read

The DURATION() function returns a stream representing the duration in seconds of each "true" state in an expression.

Syntax

Format

Stream = DURATION(StreamLogicalExpression)

Arguments

StreamLogicalExpression - A logical expression to be evaluated

Description

The logical expression represented by StreamLogicalExpression is evaluated, and a stream is returned representing the duration in seconds of each TRUE state in the results.

Format

Stream = DURATION(StreamLogicalExpression, TimeInterval)

Arguments

StreamLogicalExpression - A logical expression to be evaluated

TimeInterval - The time interval over which to calculate durations

Description

The logical expression represented by StreamLogicalExpression is evaluated, and a stream is returned representing the duration in seconds of each TRUE state in the results, with durations being split across the specified time period. For example, if StreamLogicalExpression evaluates to a TRUE value for a time period of 07:55-08:10, and the specified Interval is hourly, the output contains one "5 minute" and one "10 minute" result. Without specifying an Interval, the output would instead contain one "15 minute" result.

Related Links
TitleResults for “How to create a CRG?”Also Available in