Skip to content
Software AthleteSoftware Athlete
How to create PI Vision Calculations: The Syntax Explained

How to create PI Vision Calculations: The Syntax Explained

PI Vision allows you to use Performance Equations to create calculated data on-the-fly within your displays. Instead of writing these equations directly into a PI tag, you can create these calculated data points directly in your PI Vision display, allowing you to generate insights without modifying your underlying PI System data. Here's how you can use these in PI Vision calculations:

Step 1: Open a new PI Vision display and select 'Calculations' on the left navigation pane.

 

 

 

Step 2: You will be provided with a formula bar where you can write your Performance Equation using the same syntax as you would in the PI System. For example, you might enter a calculation like TagAvg('SINUSOID', '*-1h', '*') to calculate the average temperature over the last hour.

Example Syntax:

‘sinusoid’ * 2

(‘cdt158’+‘sinusoid’)/2

log(‘cdt158’)

(‘sinusoid’)/tagspan(‘sinusoid’)

('TagA' + 'TagB')/(3 - 'TagC')

 

 

Step 4: After writing your equation, you can click the 'Preview' button to ensure the equation is valid and see a sample output.

Step 5: Click 'OK' to save your calculation. Now drag the calculation on the display using any of the symbols, and you will see your calcualted data.

You can use any of the PI System's Performance Equation functions in these calculations, allowing you to create a wide variety of calculated data within your PI Vision displays.

Remember, calculations done in PI Vision are performed on the PI Vision server, not on the PI Data Archive server, and they don't write back any values to the PI Data Archive. This makes them a powerful tool for creating temporary or display-specific calculations without impacting your underlying PI System data.

 For a list of all functions available to PI Vision, just click here.

 

5 comments on How to create PI Vision Calculations: The Syntax Explained
  • Christof
    Christof

    Hi Dean,
    you cannot leave comments on an equation, but you can add a description to it. But you can add comments using the manual input plus symbol.

    May 28, 2024
  • Dean Bartley
    Dean Bartley

    Is there a way to leave comments on an equation to clarify what is happening?

    May 21, 2024
  • Juan Manuel Zita
    Juan Manuel Zita

    Hello, I have the same question as Yoshi Katsu.
    thank you

    March 20, 2024
  • Christof
    Christof

    Hi Yoshi, unfortunately that is not possible, you can only refer to existing attributes or tags.

    November 01, 2023
  • Yoshi Katsu
    Yoshi Katsu

    Thank you for your nice information.
    I have one question. Can I refer the equation made in calculation editor to new equation in calculation editor?
    for example,
    making equation “Sinusoid Average”
    and making" “Sinusoid Average”/ tag1".

    September 23, 2023
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