Piadvcalcexpdat() – Rockwell Automation FactoryTalk Historian SE DataLink 4.2 User Guide User Manual
Page 144

●
●
●
●
●
FactoryTalk Historian DataLink User Guide
136
=PIAdvCalcFilDat("cdf144","y","t","3h","'cdm158'=""Manual""",
"total","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
will be sampled at the compressed events of cdf144. The percent good is
returned next to the total.
PIAdvCalcExpDat()
Retrieves calculated FactoryTalk Historian point values based on an
expression, using the following syntax:
PIAdvCalcExpDat(expression, stime, etime, interval, 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
time format).
etime (string)
The end time (in FactoryTalk Historian time format).
interval (string)
The interval between calculated values (in FactoryTalk Historian time
format).
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.