Skip to main content
Data Management
PI System
Technology

Overcoming the Challenge of Including Event Frame Duration in PI Notifications

Learn how to include the Event Frame duration in PI Notifications using AFSDK and output attributes.

Roshan Soni

3 min read

Overcoming the Challenge of Including Event Frame Duration in PI Notifications

The OSIsoft PI System is a powerful tool for industrial data management, allowing users to efficiently capture and analyze data. Within the PI System, Event Frames are a particularly useful feature for capturing and analyzing specific process or event-related data over a period of time. One common requirement is to send notifications when certain event conditions occur, including critical details like the duration of the event. However, there are some obstacles users face when attempting to include Event Frame properties like duration in email notifications directly from Manage Formats.

The Problem: Non-Selectable Event Frame Properties

When configuring email notifications within PI Notifications, users expect to be able to include important Event Frame properties such as duration. However, as experienced by many users, the "Duration" property of an Event Frame does not appear as a selectable option in the Manage Formats interface. This can be frustrating for those who want to communicate comprehensive event details efficiently.

The Workaround: Utilizing Output Attributes

The good news is that there is a relatively simple workaround that has proven effective. It involves using the AFSDK to extract the "Duration" property and save it as an output attribute, which can then be included in the email notification.

  1. Access the Event Frame's Duration: Use AFSDK methods to retrieve the "Duration" property of your Event Frame. Typically, you can achieve this with a simple AFSDK snippet like EventFrame("Duration").

  2. Save as an Output Attribute: Once you have the duration value, save it into an Output Attribute within the same Event Frame. This effectively makes the duration accessible and usable within the scope of the Event Frame's attributes.

  3. Incorporate in Notifications: Now that the duration is stored as an Output Attribute, you can easily include it in your notification emails by referencing this attribute within the Manage Formats section of PI Notifications.

Benefits and Considerations

This approach not only solves the immediate issue but also extends your ability to customize notifications with any other derived or calculated data relevant to your operations. While this workaround adds a few extra steps, it highlights the flexibility and power of AFSDK in providing additional capabilities to create personalized and informative notification messages.

In summary, while the ability to directly select the "Duration" in PI Notifications might not yet exist, the method described here offers a practical and effective solution to ensure your email notifications are comprehensive and action-oriented.

Tags

#PI System
#PI Notifications
#AFSDK
#Event Frame

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.

Sign in to comment

Join the conversation by signing in to your account.

Comments (0)

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