Piadvcalcfildat() – Rockwell Automation FactoryTalk Historian SE DataLink 4.2 User Guide User Manual
Page 142

●
●
●
●
●
FactoryTalk Historian DataLink User Guide
134
Argument
Explanation
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 ouput code, 0-7.
PIServer (string)
The target FactoryTalk Historian server.
Returns
See specific information for PICalcDat() outcodes (page 132).
Example:
The following retrieves totals for the tag cdf144, from midnight
yesterday to midnight today at three-hour intervals from the default
FactoryTalk Historian server:
=PIAdvCalcDat("cdf144","y","t","3h","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.
PIAdvCalcFilDat()
Retrieves filtered, calculated FactoryTalk Historian point values using the
following syntax:
PIAdvCalcFilDat(tagname, stime, etime, interval, filtexp,
mode, calcbasis, sampmode, sampfreq, minpctgood, cfactor,
outcode, PIServer)