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

Page 148

Advertising
background image

FactoryTalk Historian DataLink User Guide

140

An output code (page 104) of 2 transposes the output array that results
from an output code of 0 and an output code of 3 transposes the output
array that results from an output code of 1.

Example:

The following calculates the amount of time that the expression from cell
$A$1 is true from the FactoryTalk Historian server named thevax at
one-hour intervals, starting from midnight yesterday to midnight today:

=PITimeFilter($A$1,"y","t","1h","seconds",1,"thevax")

It also displays the time stamps for the start time of each calculation
interval. The calculation result is expressed in seconds.

PITimeFilterVal()

Returns the amount of time over which a FactoryTalk Historian point
expression evaluates as true for a specified time range, using the following
syntax:

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

timeunit (string)

Time unit of the calculated result (in FactoryTalk Historian time

format).

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