Rockwell Automation FactoryTalk Historian SE DataLink 4.2 User Guide User Manual

Page 136

Advertising
background image

FactoryTalk Historian DataLink User Guide

128

Arguments

Argument

Explanation

tagname (string)

The tag name or names matching the desired FactoryTalk Historian
points for calculation.

stime (string)

The start time for the range of calculation (in FactoryTalk Historian

time format).

etime (string)

The end time (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 PICalcVal() outcodes (page 124).

Example:

The following calculates a time-weighted total for the tag cdf144 from
yesterday to today during the time periods when tag cdm158 is in Manual
from the default FactoryTalk Historian server:

=PIAdvCalcFilVal("cdf144","y","t","'cdm158'=""Manual""","tota
l","time-weighted","pt. compressed","10m",50,1,4,)

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

Advertising