Piadvcalcexpfildat() – Rockwell Automation FactoryTalk Historian SE DataLink 4.2 User Guide User Manual
Page 145

9
●
FactoryTalk Historian DataLink Function Reference
●
●
●
●
●
137
Argument
Explanation
PIServer (string)
The target FactoryTalk Historian server.
Returns
See specific information for PICalcDat() outcodes (page 132).
Example:
The following retrieves totals for the expression 'cdf144'+'cdt158',
from midnight yesterday to midnight today at 3-hour intervals from the
default FactoryTalk Historian server:
=PIAdvCalcExpDat("'cdf144'+'cdt158'","y","t","3h","total","ti
me-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
sampled at the combined compressed events of cdf144 and cdt158.
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.
PIAdvCalcExpFilDat()
Retrieves filtered, calculated FactoryTalk Historian point values based on
an expression, using the following syntax:
PIAdvCalcExpFilDat(expression, stime, etime, interval,
filtexp, mode, calcbasis, sampmode, sampfreq, minpctgood,
cfactor, outcode, PIServer)
Arguments
Argument
Explanation
expression (string)
A FactoryTalk Historian calculation expression.
stime (string)
The start time for the range of calculation (in FactoryTalk Historian