Piadvcalcval() – Rockwell Automation FactoryTalk Historian SE DataLink 4.2 User Guide User Manual
Page 134
![background image](/manuals/581046/134/background.png)
●
●
●
●
●
FactoryTalk Historian DataLink User Guide
126
Mode
Column 1
Column 2
Column 3
Column 4
Count
Count value
Percent good
Mean
Mean value
Percent good
An output code of 6 transposes the output array that results from an
output code of 4, and results are returned in rows instead of in
columns.
An output code of 7 transposes the output array that results from an
output code of 5, and results are returned in rows instead of in
columns.
Example:
The following calculates a time-weighted total for the tag cdf144 from
yesterday to today from the default FactoryTalk Historian server:
=PICalcVal("cdf144","y","t","total",1440,4,)
The result is multiplied by 1440. The percent good is returned next to the
total.
PIAdvCalcVal()
Retrieves a calculated FactoryTalk Historian point value using the
following syntax:
PIAdvCalcVal(tagname, stime, etime, mode, calcbasis,
minpctgood, cfactor, outcode, PIServer)
Arguments
Argument
Explanation
tagname (string)
The tag name matching the desired FactoryTalk Historian point 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).