14 Replies Latest reply on Dec 18, 2015 12:22 AM by skwan

    Seeking AN SDK advice

    mdspath

      Hello fellow AF SDK users:

      We have been developing a windows app using the AF SDK to gather data from our PI sever. We do not use the AF framework to configure the tags, they are just plain old pi points on the pi server. We are adding a feature which will look at data that is currently coming into the pi server and give them a view (much like process book). We also want to have them be able to set alarm limits on the tags they choose to view.

      I was wondering if we could have them configure this through our application with us using the AN SDK.

      Any thoughts would be appreciated,

      Thanks,

      Mike

        • Re: Seeking AN SDK advice
          bshang

          Hi Mike,

           

          AN SDK is for PI Notifications, and probably isn't relevant here.

           

          For the use case above, AF SDK is still the best choice. You can use the OSIsoft.AF.PI namespace to work with only PI Server objects and ignore any AF-awareness in the application. If you want to view real-time information from the PI Server (i.e. signup for snapshot updates as ProcessBook would), you can use the PIDataPipe within AF SDK for this purpose. How to use the PIDataPipe or the AFDataPipe

          1 of 1 people found this helpful
            • Re: Seeking AN SDK advice
              mdspath

              Hi Barry:

              I really value your guidance here, and I apologize if I'm confusing the situation. In my first post I mentioned we do not use the AF database to represent our lab (or domain). I'm wondering if it would be possible to setup the AF framework to represent our domain and then use an SDK to configure notifications to setup alarming and e-mailing. If we had an SDK can we use it to enable and disable notifications at runtime? It seems like that we could from first glance but I don't want to make any leap in faith there.

              Thanks,

              Mike

                • Re: Seeking AN SDK advice
                  bshang

                  Hi Mike,

                   

                  Yes, if you were to set up your lab structure in AF and integrate that with PI, then you could take advantage of PI Notifications. However, we are in a redesign of PI Notifications (last release was 2012) and a new version should be out in 2016, so if you choose this route, I would look into integrating with the newer version. Next Generation PI Notifications . AF SDK should be able to be used in this case to configure the Notifications, but there will be a GUI as well to make this easier. Can you elaborate on the requirement for using an SDK to configure the Notifications? Typically, we try to make it convenient to manage them in a GUI environment like PSE.

                    • Re: Seeking AN SDK advice
                      mdspath

                      Hi Barry:

                      Our application is basically a customized client to the Pi achieve, targeted to a specific type of lab, We have all of our functionality contained inside our application so we would need to have a user:

                      * setup/change/create e-mail list groups that will get notified for certain tag violations

                      * setup/change/create tags in the AF database

                      * setup/change/create the HH, H, L LL limits on the tags in the AF database

                      * our application will have a dashboard to show alarm metrics (what % of alarms are coming from what resource, over last week, today, etc.)

                      * an alarm will be active under certain conditions (resource status bit high, etc.)

                      * I'm sure there are more but these are the major requirments

                      Mike

                • Re: Seeking AN SDK advice
                  Roger Palmen

                  "Setting alarm limits" is the key here i think. What is you expectation if the alarm limits are met? Or do you just need to store and retreive these limit values through AFSDK?

                   

                  Of course there are many ways to store alarm limits, add them to the exdesc or instrumenttag of the PI Point, place them in an AF model, use Noficiations, etc.

                    • Re: Seeking AN SDK advice
                      mdspath

                      Hi Roger:

                           Thank you for your reply, I'm not sure what you mean by store alarm limits to exdesc or instrument tag? What I want to do is give the user a way to configure HH, H, L, LL limits on a pinpoint, then as we plot the pipoint in on a graph control updated every 5 sec. send an e-mail when the alarm value is reached (debounced of course)

                      I know there are 3rd party applications that do this for opc-da data I'm currently looking into using them if they can provide an api but so far I have not found any.

                      Any thoughts appreciated.

                      Mike

                        • Re: Seeking AN SDK advice
                          gregor

                          Hello Mike,

                           

                          Before looking into any programmatic approach, I would suggest if something available today meets your requirements.

                           

                          Just looking at the PI Data Archive capabilities, PI Alarm would be what you are looking for except the piece of sending emails. PI Alarm can be configured through PI System Management Tools (PI SMT). Please see PI Data Archive 2015 R2 Applications User Guide for details.

                           

                          On the other hand, what you describe reads like a possible good reason to start using PI Asset Framework. You can set up the limits as Attributes of an Element and have the choice between a fixed value, Formula Data Reference, PI Point Data Reference, Table Lookup Reference and PI Analytics Reference. Further you can use PI Notifications to define the conditions for email alert, the group supposed to receive those, acknowledgement and escalation.

                           

                          Please note that PI Notifications is currently rewritten. The current release is PI Notifications 2012a and the upcoming release will be PI Notifications 2016. There will be a one-time migration tool that will support the migrating Notifications created with the current Release to the new release.

                          • Re: Seeking AN SDK advice
                            Roger Palmen

                            Agree with Gregor that the best approach would be to use PI AF. But if you're stuck with just the PI Data Archive and need to be able to store these limits you would need to encode these on an unused attribute of a PI Point. For that you could use e.g. the ExDesc field.

                             

                            As Alarm subsystem (https://livelibrary.osisoft.com/LiveLibrary/content/en/server-v6/GUID-C6AA8268-F967-40F4-A405-1B23642F5AE3) is superseded by Pi Notifications i would not recommend that going forward, but it might be a stop-gap to your requirements.

                             

                              • Re: Seeking AN SDK advice
                                mdspath

                                Sorry for the delay I had found a 3rd party product that had an API that we could use to configure alarm limits on opc-da tags. This was straight forward to implement in our product but very expensive so I'm back looking into how to do this woth the tools we already have in PI. PI Alarm, it seems to me will increase tag count, not sure by how much, would I create a tag (pi point) for a H, then another for HH?

                                If I have to start using AF I can I just need to be sure that the our application can configure the alarm limits, we may have to roll our own e-mailer.

                                 

                                Mike

                                  • Re: Seeking AN SDK advice
                                    Roger Palmen

                                    Using AF is the easiest option in my opinion, allowing yoy to build any alarm datamodel you'd like, and not requiring PI Points. Emailing can be done using PI Notification, but that does come with a PI Point cost (1 PI Point license per Notification, although 7 PI Points are used).

                                    A workaround would be to build you own emailer based on the data available in the AFmodel. Depending on your requirements, can't be too complex for a simple mailer in a little-demanding organisation.

                                    Or wait until 2016...

                            • Re: Seeking AN SDK advice
                              skwan

                              Mike,

                               

                              Your original question is one of the targeted use cases for PI Coresight 2016 and PI Notifications 2016.  We're rolling out a new feature in AF 2016 that supports what we call "attribute traits", one of which is the ability to designate child attributes to be "limits"  These traits (limits) are then used extensively in PI Coresight and PI Notifications.  Unfortunately these aren't in the released products yet but rather in upcoming releases in 2016.  I just want you to be aware of current development efforts.

                               

                              --

                              Steve Kwan

                              1 of 1 people found this helpful