Click or drag to resize
OSIsoft, LLC

AFCalculationCalculateAtIntervals Method

This method returns an AFValues collection that contains the result of evaluating the passed expression over the passed time range at a defined interval.

Namespace:  OSIsoft.AF.Data
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 2.10.8.440
Syntax
public static AFValues CalculateAtIntervals(
	Object target,
	string expression,
	AFTimeRange timeRange,
	AFTimeSpan sampleInterval
)

Parameters

target
Type: SystemObject
The target can either be a PIServer, an AFDatabase, or any derived objects of AFBaseElement. References to attributes or points are based on the target.
expression
Type: SystemString
A string containing the expression to be evaluated. The syntax for the expression generally follows the Performance Equation syntax as described in the PI Data Archive documentation, with the exception that expressions which target elements use attribute names in place of tag names in the equation.
timeRange
Type: OSIsoft.AF.TimeAFTimeRange
The bounding time for the evaluation period.
sampleInterval
Type: OSIsoft.AF.TimeAFTimeSpan
Specifies how often the expression is evaluated.

Return Value

Type: AFValues
Returns an AFValues collection containing the results of the expression calculated at the specified sample interval.
Remarks
Calculations are limited to Attributes or PI Points which originate from a single PI Data Archive. Attributes which resolve to a static value (no data reference configured), are also acceptable.
Version Information

AFSDK

Supported in: 2.10.5, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6, 2.5
See Also
Enabling Operational Intelligence