String arguments, Cell references, Piserver argument – Rockwell Automation FactoryTalk Historian SE DataLink 4.2 User Guide User Manual

Page 111

Advertising
background image

8

Supplementary Information

103

For example, the expression below finds the difference between the natural
logarithm of the value of the tag cdep158 and the cosine of the value of
the tag cdep158.

(log('cdep158') - cos('cdep158'))

String Arguments

String arguments must be surrounded by double quotes. For example, to
retrieve the snapshot time and value for the sinusoid tag from the
FactoryTalk Historian Server casaba, select a 1 x 2 output array and
type:

=PICurrVal("sinusoid", 1, "casaba")

Cell References

You can use cell references for any FactoryTalk Historian DataLink
function arguments. For example, the following function:

=PICurrVal(A1, A2, A3)

gives the same result as the function definition

=PICurrVal("sinusoid", 1, "casaba")

if the same three arguments are stored in cells A1, A2, and A3,
respectively.

PIServer Argument

The PIServer argument is optional provided the desired FactoryTalk
Historian server is specified as the default under PI > Connections.

For example, to retrieve the current value for the tag sinusoid from the
default FactoryTalk Historian server, type:

=PICurrVal("sinusoid",0,)

into a 1x1 output range.

Advertising