Handling External Changes in AFAttributes for PI Systems
Learn how to manage and adapt to AFAttribute changes in PI Systems without restarting processes using `FindChangedItems`, `Refresh`, and `ProcessAppliedChanges`.
Roshan Soni
Handling External Changes in AFAttributes for PI Systems
Working with OSIsoft's PI System, particularly with AF (Asset Framework), ensures robust data management and asset maintenance. However, scenarios arise when handling external configurations such as changes in AFAttributes, especially when AFAttributes point to different PIPoints while using an AFDataPipe. This post will guide you through managing such changes without needing to restart your processes.
Understanding the Problem
Imagine you have an AFDataPipe initialized to monitor changes in AFAttributes. You are subscribing to updates and handling events as and when they occur. But then, a configuration change is made externally — an AFAttribute that used to point to a specific PIPoint is now reconfigured to point to a different one. As a result, your current AFDataPipe signups no longer receive updates, and typically, the straightforward workaround might be to restart your system. Fortunately, there is a way to handle this more gracefully.
Solution: Update and Adapt
To manage such external changes efficiently, follow these steps:
-
Detect Configuration Changes: Use
PISystem.FindChangedItemsto track any configuration changes made to AFAttributes. This method retrieves the changes from the PI Server and signals necessary updates. -
Refresh AFAttributes: After identifying the changes, invoke
AFChangeInfo.Refresh(). This operation updates the loaded AFAttribute objects, ensuring they align with the recent configuration adjustments from the PI Server. -
Apply Changes to AFDataPipe: Finally, call
AFDataPipe.ProcessAppliedChanges(). This crucial step synchronizes your AFDataPipe signups with the changes, reflecting updates to the newly pointed PIPoints without requiring a restart or the hassle of re-signing.
Benefits of This Approach
By following this method, your applications will remain robust and responsive to changes. This not only minimizes downtimes but also enhances system reliability and user trust — ensuring that your data integrity and processes are never compromised by configuration changes.
In Conclusion
Managing configuration changes in an AF environment need not be fraught with disruptions. With API functionalities such as FindChangedItems, Refresh, and ProcessAppliedChanges, you can efficiently handle external alterations, keeping your data pipelines continuous and consistent. Embrace these tools to ensure your systems are both adaptable and resilient in the face of changes.
By understanding and implementing these techniques, you are ensuring your PI System remains dynamic and responsive to real-world operational changes, all while maintaining high performance and reliability.
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