Module database functions, Pialiastotag() – Rockwell Automation FactoryTalk Historian SE DataLink 4.2 User Guide User Manual
Page 152

●
●
●
●
●
FactoryTalk Historian DataLink User Guide
144
Module Database Functions
PIAliasToTag()
Retrieves a tag name based on a FactoryTalk Historian point alias, using
the following syntax:
PIAliasToTag(alias, modulepath, querydate, outcode, PIServer)
Arguments
Argument
Explanation
alias (string)
The module database alias corresponding to the desired FactoryTalk
Historian point.
modulepath (string)
The full module path to the alias.
querydate (integer)
A date limit such that only aliases created at or after the date are
returned.
Outcode (integer)
An ouput code, either 0, 1, or 2.
PIServer (string)
The target FactoryTalk Historian server.
Returns
Outcode
Column 1
Column 2
0
Tagname
1
Tagname
Server of tag
An output code (page 104) of 2 transposes the output array that results
from an output code of 1.
Example:
The following returns the tag name corresponding to the Temperature alias
of module Reactor1 which is a submodule of Unit1. Unit1 is at the root of
the module database for a FactoryTalk Historian server named thevax.
The module database is queried at current time.
=PIAliasToTag("Temperature","\Unit1\Reactor1","*",0,"thevax")