Piadvcalcfilval() – Rockwell Automation FactoryTalk Historian SE DataLink 4.2 User Guide User Manual

Page 135

Advertising
background image

9

FactoryTalk Historian DataLink Function Reference

127

Argument

Explanation

mode (string)

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

calcbasis (string)

The weighting method used to calculate values.

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 output 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 from the default FactoryTalk Historian server:

=PIAdvCalcVal("cdf144","y","t","total","time-
weighted",50,1,4,)

The result is multiplied by 1. The minpctgood is 50 percent so result
will only be displayed if percent good is 50 percent or greater. The percent
good is returned next to the total.

PIAdvCalcFilVal()

Retrieves a filtered, calculated FactoryTalk Historian point value using the
following syntax:

PIAdvCalcFilVal(tagname, stime, etime, filtexp, mode,
calcbasis, sampmode, sampfreq, minpctgood, cfactor, outcode,
PIServer)

Advertising