Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI System Management Tools

TagVal (Tag-based PE function)

  • Last UpdatedFeb 10, 2026
  • 1 minute read

Find a point's Archive value at a given time.

Syntax

TagVal(tagname [, time])

Arguments

tagname

A tagname.

time

Optional. A time expression. If you omit this argument, '*' is used.

Returns

The archived value of tagname at time. This value is interpolated unless the point has the Step attribute of 1 (or Resolution Code of 4 for PI2).

Exceptions

If point does not exist, or has no archived value at time, returns an error value.

Examples

  • Current value

    TagVal('tag1')

    Returns the value of 'tag1' at the current time.

  • Current value at the time of offset

    TagVal('digitaltag', 't+11h')

    Returns the value of 'digitaltag' at 11:00 AM today.

  • Value of an enumeration attribute

    TagVal('enum_att1')

    Returns the current value of 'enum_att1', an attribute from an enumeration set.

  • Value at a specific timestamp

    TagVal('tag1', '23-aug-2012 15:00:00')

    Returns the value of 'tag1' at 3:00 PM on August 23, 2012.

Note: To check the syntax of the performance equation, use the Pipetest Utility.

NextEvent (page ), NextVal (page ), PrevEvent (page ), PrevVal (page )

In This Topic
TitleResults for “How to create a CRG?”Also Available in