Can You Access PI Point Annotations in AF Formulas or Analyses?
It is not possible to directly retrieve annotation content from PI Points in AF Formulas or AF Analyses. This blog explores current limitations and practical workarounds, like custom AFSDK data references and using quality tags.
Roshan Soni
Can You Access PI Point Annotations in AF Formulas or Analyses?
Annotations are a valuable feature in OSIsoft PI System, allowing users to attach additional context or manual comments directly to PI data points. A common question that arises for PI System engineers and AF administrators is, "Is it possible to access and use PI Point annotations directly within AF (Asset Framework) Formulas or Analyses?"
The Short Answer: Limited Support in AF Out-of-the-Box
As of now, PI AF Formulas and Asset Analyses offer only limited interaction with annotations. The only built-in function related to annotations is IsSet, which allows a formula to determine if a data value is accompanied by an annotation. However, AF does not provide any mechanism to read the content of the annotation itself within a formula or analysis expression.
Example:
IsSet('MyInputAttribute')
This formula returns True if the current value of 'MyInputAttribute' is annotated.
But, you cannot retrieve or use the actual text/content of the annotation in a formula or analysis logic.
Why Might We Want Annotation Access?
Some use cases demand more. For instance, an engineer may want to override or disregard certain input values for an analysis during periods where specific manual annotations are applied (e.g., marking a sensor as faulty or maintenance ongoing). Access to the annotation's content would allow for more dynamic and contextually aware calculations.
Workarounds: Extending AF Functionality
While native AF formula and analysis do not support this, there are a couple of workarounds you might consider:
1. Custom Data Reference Using AFSDK
By developing a custom data reference using the AFSDK (Asset Framework Software Development Kit), you can programmatically access PI Point annotations. This lets you:
- Read the annotation's content
- Incorporate annotation logic into attribute calculations
- Develop flexible and rich business logic based on manual tags/comments
This approach requires programming knowledge and deployment of custom assemblies on your AF server.
2. Use a Separate “Quality Tag” Attribute
Another approach is to create a secondary PI tag or attribute (often called a "quality tag"), where you write manual flags or codes. Your formulas and analyses can reference this tag to determine if a value should be overridden or ignored in calculations. While not as flexible as annotations, this keeps everything within standard PI and AF configuration and avoids custom code.
Engage Product Management
If reading annotation content in AF expressions would benefit your workflows, consider communicating your needs to the PI System product management team. Feature requests and feedback help shape future PI AF releases.
Conclusion
Direct access to annotation content in AF formulas and analyses isn’t currently supported. But with some creative solutions, like custom AFSDK data references or auxiliary tags, most business requirements can be met. If this is a critical feature for your operations, be sure to voice your needs through the OSIsoft/AVEVA feedback channels!
Further Reading:
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