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

Page 137

Advertising
background image

9

FactoryTalk Historian DataLink Function Reference

129

will be sampled at the compressed events of cdf144. 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.

PIAdvCalcExpVal()

Retrieves a calculated FactoryTalk Historian point value based on an
expression, using the following syntax:

PIAdvCalcExpVal(expression, stime, etime, 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).

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.

PIServer (string)

The target FactoryTalk Historian server.

Advertising