Rockwell Automation FactoryTalk Historian SE DataLink 4.2 User Guide User Manual

Page 146

Advertising
background image

FactoryTalk Historian DataLink User Guide

138

Argument

Explanation
time format).

etime (string)

The end time (in FactoryTalk Historian time format).

interval (string)

The interval between calculated values (in FactoryTalk Historian time

format).

filtexp (string)

The filter expression used to filter results.

mode (string)

The type of calculation to be used to compute point values.

calcbasis (string)

The weighting method used to calculate values.

sampmode (string)

The sampling method used for calculation expressions.

sampfreq (string)

The frequency used for interpolated sampling.

minpctgood (number) The minimum percentage of good data required to calculate and

return a value.

cfactor (number)

The time unit of flow for the source tag, required for Total

calculations.

outcode (integer)

An ouput code, either 0, 1, 2, 4, 5, 6, or 7, and not 3.

PIServer (string)

The target FactoryTalk Historian server.

Returns

See specific information for PICalcDat() outcodes (page 132).

Example:

The following calculates a time-weighted total for the expression
'cdf144'+' cdt158' when 'productid' = "Product2" at 3-
hour intervals from yesterday to today from the default FactoryTalk
Historian server:

=PIAdvCalcExpFilDat("'cdf144'+'cdt158'","y","t","3h","'produc
tid'="Product2"","total","time-
weighted","compressed","10m",50,1,4,)

The result is multiplied by 1. Since compressed is the specified sampling
mode, the sampling frequency is ignored and the expression will be

Advertising