A simple method of using PI Notifications to advise when an Interface is offline

Blog Post created by gavin.strack Champion on May 11, 2015



One of my sites has a hiccup with a server, which resulted in one of the SCADA runtime instances crashing.  This instance was being used as the SCADA-to-PI interface client so the net result of this was data stopped being sent to the PI Data Archive.


One of the Metallurgists called me a little while later asking if there was a problem because he stopped getting data in his ProcessBook pages.  We figured out the problem and got everything going again.  Unfortunately, by the time I got to fix it we had lost a couple of hours of data.  It wasn't a major disaster, but I wanted to try and get notified sooner without having to rely on someone noticing a problem.


Firstly, I created an Interface Template with a few attributes.  Most of these are just containers for now but I may end up using these for new functionality later.



The InterfaceStatus attribute is a formula that compares if the value of the Reference attribute is greater than the value of the Threshold attribute.  If  Reference>Threshold then the interface is online (i.e. valid/healthy data) so the result stored in InterfaceStatus = TRUE.  If  Reference<Threshold, then InterfaceStatus=FALSE.


Then I created an Event Frame template...



I'm just grabbing the main power incomer reading for now as I'm mostly interested in being notified of the event rather than getting plant info.


I then created the Interface Element and set up a new Analyses to trigger the event frame whenever the InterfaceStatus attribute = 0. (i.e. FALSE)




Finally, I set up a new email notification so that I am sent an email whenever InterfaceStatus = FALSE



Works like a charm!


I'm now looking at setting up two interfaces in HA arrangement.  I'll need to come up with a new way of detecting an interface failure as this example will only trigger if both interfaces fail.  I'll have a think about that and see what I can come up with.