Pitimedat(), It also displays the time stamps – Rockwell Automation FactoryTalk Historian SE DataLink 4.2 User Guide User Manual

Page 130

Advertising
background image

FactoryTalk Historian DataLink User Guide

122

Example:

The following calculates the square root of the value of the tag sinusoid
from the FactoryTalk Historian server thevax at one-hour intervals,
starting from midnight yesterday to midnight today:

=PIExpDat("sqr('sinusoid')","y","t","1h",1,"thevax")

It also displays the time stamps.

PITimeDat()

Retrieves sampled FactoryTalk Historian point values corresponding to a
specified array of time stamps, using the following syntax:

PITimeDat(tagname, timestamps, PIServer, mode)

Arguments

Argument

Explanation

tagname (string)

The tag name or names matching the desired FactoryTalk Historian

points.

timestamps
(reference)

A reference to an array of time stamps in FactoryTalk Historian time
format.

PIServer (string)

The target FactoryTalk Historian server.

mode (string)

The mode used to determine which values to retrieve.

Returns

Sampled data. If the time stamps are in a single column, the data are
returned along a single column. If the time stamps are in a single row, the
data are returned along a single row.

Example:

The following retrieves interpolated timed data for the times located in
cells B1 through B12 for the tag mytag from the default FactoryTalk
Historian server:

Advertising