Calculating Cross-Element Attributes in PI AF: A Comprehensive Guide
Learn how to set up calculations in PI AF involving attributes from different elements with data sourced from external databases like Oracle.
Roshan Soni
Calculating Cross-Element Attributes in PI AF: A Comprehensive Guide
In the complex world of industrial data management, the ability to effectively calculate, manipulate, and store data is paramount. One common scenario for PI System users is the need to perform calculations on attributes sourced from different elements. In this guide, I’ll walk you through how to set up such calculations, particularly when your data is queried from external sources like Oracle databases, using PI AF (Asset Framework).
Scenario Breakdown
Imagine you have two elements in PI AF:
- Element A with an attribute Event A
- Element B with an attribute Event B
Both attributes are populated through templates that query external data sources, specifically Oracle databases. The task is to calculate a new attribute, Event Total, which is the sum of Event A and Event B.
How to Set Up the Calculation
To sum attributes from different elements, you’ll need to set up an Analysis in PI AF. Here’s how you can do it effectively:
Step 1: Understand Your Hierarchy
Before setting up the calculation, make sure you clearly understand your data hierarchy. The user case outlined involves two separate elements, with their attributes sourced from external databases.
Step 2: Use PI System Explorer
Open PI System Explorer to configure your Analysis. This is your workspace where you will reference attributes from different elements.
Step 3: Referencing Complete Attribute Paths
When setting up the Analysis, ensure that you reference the complete path to each attribute. This is crucial because PI AF needs the full path to correctly locate and retrieve data from different elements. Extra pathways can be easily obtained by right-clicking any attribute in PI System Explorer and selecting "Copy path." This functionality eradicates the need to manually enter the full path, reducing the chances of errors.
Step 4: Configure the Analysis
In PI System Explorer:
- Navigate to the Analyses tab of your designated element.
- Create a new Analysis.
- Use the expression syntax to sum the attributes:
Event Total = '\\ElementA\Event A' + '\\ElementB\Event B'.
Step 5: Execution and Scheduling
After configuring the analysis, set the scheduling service to execute as needed. This could be triggered by events or set at regular intervals, depending on your operational needs.
Considerations
Data Storage
While setting up server-side calculations offers operational flexibility, it’s vital to consider the implications of storing these calculations, notably if you're contemplating storing all raw and calculated values in the PI Server.
- Licensing: Evaluate the cost implications of storing additional data points within the PI Server. Licensing models may impose limitations on the number of tags or data streams stored.
- Consult the User: Before opting for PI Server storage of calculations, ensure necessary discussions are held with your stakeholders or users regarding cost and resource usage.
Conclusion
Performing calculations on attributes drawn from various elements is a functional necessity for comprehensive data analysis in PI AF. By correctly setting up Analyses and referencing attributes through their full paths, you can ensure seamless operation and integration of cross-element calculations. As always, balance operational needs with considerations on licensing and data storage to optimize your PI AF environment effectively.
For more insights and technical guides, continue to explore our blog where we delve into the nuances of PI System engineering and data solutions.
Tags
About Roshan Soni
Expert in PI System implementation, industrial automation, and data management. Passionate about helping organizations maximize the value of their process data through innovative solutions and best practices.
No comments yet
Be the first to share your thoughts on this article.
Related Articles
Enhancing PI ProcessBook Trends with Banding and Zones: User Needs, Workarounds, and the Road Ahead
A look at the user demand for trend banding/zoning in OSIsoft PI ProcessBook, current VBA workarounds, UI challenges, and how future PI Vision releases aim to address these visualization needs.
Roshan Soni
Migrating PIAdvCalcFilVal Uptime Calculations from PI DataLink to PI OLEDB
Learn how to translate PI DataLink's PIAdvCalcFilVal advanced calculations—like counting uptime based on conditions—into efficient PI OLEDB SQL queries. Explore three practical approaches using PIAVG, PIINTERP, and PICOunt tables, and get tips for validation and accuracy.
Roshan Soni
Understanding PI Web API WebID Encoding: Can You Generate WebIDs Client-Side?
Curious about how PI Web API generates WebIDs and whether you can encode them client-side using GUIDs or paths? This article explores the encoding mechanisms, current documentation, and best practices for handling WebIDs in your applications.
Roshan Soni