Skip to content
Software AthleteSoftware Athlete
PI Vision Calculations: List of all available functions

PI Vision Calculations: List of all available functions

Ever wanted to know which functions are available for PI Vision calculations and how to use them exactly? Don't worry, here is a list of all Functions available for Calculations in PI Vision 2021 and above:

 

Function Description Example Usage
Exp Calculates the exponential value of a number Exp(2)
False Represents a boolean false value False
FindEq Finds the first occurrence of a specified value within a range FindEq('tag1', '-1d', '*', 50)
FindGE Finds the first occurrence of a value greater than or equal to a specified value within a range FindGE('tag1', '-1d', '*', 50)
FindGT Finds the first occurrence of a value greater than a specified value within a range FindGT('tag1', '-1d', '*', 50)
FindLE Finds the first occurrence of a value less than or equal to a specified value within a range FindLE('tag1', '-1d', '*', 50)
FindLT Finds the first occurrence of a value less than a specified value within a range FindLT('tag1', '-1d', '*', 50)
FindNE Finds the first occurrence of a value not equal to a specified value within a range FindNE('tag1', '-1d', '*', 50)
Hour Extracts the hour component from a time expression Hour('t')
If Returns one value if a condition is true, and another value if the condition is false if('tag1' > 10) then 0 else 1
Left Extracts a specified number of characters from the left side of a string Left('string', 3)
Ln Calculates the natural logarithm of a number Ln(10)
Max Returns the maximum value from a list of arguments Max('tag1', 'tag2', 'tag3')
Min Returns the minimum value from a list of arguments Min('tag1', 'tag2', 'tag3')
Minute Extracts the minute component from a time expression Minute('t')
Month Extracts the month component from a time expression Month('t')
NotEquals Compares two values and returns true if the first value is not equal to the second value 'tag1' <> 'tag2'
NextVal Returns the next value after a specified time NextVal('tag1', 't')
Or Performs a logical OR operation on two boolean values 'tag1' or 'tag2'
PrevVal Returns the previous value before a specified time PrevVal('tag1', 't')
Round Rounds a number to the nearest integer or to a specified number of decimal places Round('tag1', 2)
Second Extracts the second component from a time expression Second('t')
Sin Calculates the sine of an angle in radians Sin(0)
TagAvg Calculates the average of a tag over a specified time range TagAvg('tag1', '-1h', '*')
TagMax Retrieves the maximum value of a tag within a specified time range TagMax('tag1', '-1h', '*')
TagMin Retrieves the minimum value of a tag within a specified time range TagMin('tag1', '-1h', '*')
TagSpan Retrieves the span (difference between maximum and minimum) value of a tag within a specified time range TagSpan('tag1')
TagSource Retrieves the point source string of a tag TagSource('tag1')
TagTot Calculates the totalized value (time integral) of a tag over a specified time range TagTot('tag1', 'y', '*', 85)
TagType Retrieves the type character (I, R, or D) of a tag TagType('tag1')
TagTypVal Retrieves the typical value of a tag TagTypVal('tag1')
TagVal Retrieves the archived value of a tag at a given time TagVal('tag1', '23-aug-2012 15:00:00')
TagZero Retrieves the zero value of a tag TagZero('tag1')
Tan Calculates the tangent of an angle in radians Tan(1)
Tanh Calculates the hyperbolic tangent of a number Tanh(1)
Text Concatenates strings representing argument values Text(Round('sinusoid', 1), " is the current value of 'sinusoid' at ", '*')
Total Returns the sum of two or more values Total('tag1', 'tag2', TagVal('tag1', 'y'))
Trim Trims blanks on both sides of a string Trim(" String ")
Trunc Truncates a number or time to the next lower unit Trunc(28.75, 10)
UCase Converts a string to uppercase UCase("String")
Weekday Extracts the day of the week from a time expression Weekday('*')
Year Extracts the year from a time expression Year('*')
Yearday Extracts the day of the year from a time expression Yearday('*')

 

For more information visit the official AVEVA Documentation: https://docs.aveva.com/bundle/pi-server-da-smt/page/1021628.html

8 comments on PI Vision Calculations: List of all available functions
  • Youssef Elgharbawi
    Youssef Elgharbawi

    You can use IF in this form
    IF ‘tag’ <X then (Y) else (Z)

    November 29, 2023
  • Lorenzo Hernandez Jr
    Lorenzo Hernandez Jr

    Hamish, IF should still be supported. I use it all the time in my PI Vision Calculations.

    November 25, 2023
  • Hamish Ritchie
    Hamish Ritchie

    Are you sure IF is still supported? I haven not managed to get it to work at all, and it does not appear in AVEVA’s list of supported syntax

    November 14, 2023
  • « Previous 1 2
Leave a comment

Your email address will not be published..

Vision Library+

Upgrade your PI Vision

Vision Library+ is a collection of advanced custom symbols for AVEVA PI Vision. From DataEntry, to Advanced Chart and UX Controls - Vision Library+ includes everything you need to bring your data insights to the next level. Get started now!

Learn more
Cart 0

Your cart is currently empty.

Start Shopping