Count alarms/different alarms in a PI TAG over a certain time

I have a PI-tag that collect all alarms of PLC/WinCC and need to do some analytics on it.

 

Tag value looks like this and has a lot of changed values:

 

@LOCALMACHINE::WAZI\ALGEMEEN_WAZI/SMS/BIOLOGIE|Process message|Process message|15007|64|-BIO- aktieve PH sonde < PH laag parameter||ENABLED|NOT ACTIVE|ACKED|NOACKREQD|192|WAZI|ALGEMEEN_WAZI/SMS/BIOLOGIE|Process message class|Process message|1||809100

 

I was already able to collect the needed values/statuses from the big string into PI AF attributes.

 

What I want to do now is to count how many alarms we had over an certain time. Made a new attribute(boolean) that indicates if it is a new alarm (active and not Acknowledged)

And then use this expression NumOfChanges('NewAlarm','*-24h','*')/2

But think there must be a better way?

 

But the biggest problem is that I want a count of the different alarms.

For example we have 6 alarms in the last hour 3x alarm1 2x alarm2 en 1x alarm3

Don't know how to start with this.

Do I need to create an array and then do some calculation on it? Or is there an other way?

Anyone experience with this?

Parents
  • Thanks for the answer, Counting the event is working now, but make some sort of parreto of the different alarms will not work. What you are suggesting will be hard to implement and will not be flexible. We are talking about 50+ of different alarms and will grow with new production areas that will be added.

    I could work with a prefix in the Wincc and then make PI Point attribute for every prefix, but would be a lot of work creating + if some collegues doesn't follow the correct prefix it would not be counted...

  • So, what the challenging part? Are you worried about tag count towards your license, or the prospect of manual work to get this up and running?

     

    As a software developer, I'd probably look into solving this through code. There are numerous ways to attack this, but an AF Custom Data Reference could be created to interpret your big string and provide time series or aggregated data, such as the counts of the different alarms. You'd configure your custom DR with the big string PI tag as input parameter, together with some specs on what you'd like to get out of it - then you'd be able to get data presented directly in an AF Attribute without further needs for analyses or extra PI tags being created.

Reply
  • So, what the challenging part? Are you worried about tag count towards your license, or the prospect of manual work to get this up and running?

     

    As a software developer, I'd probably look into solving this through code. There are numerous ways to attack this, but an AF Custom Data Reference could be created to interpret your big string and provide time series or aggregated data, such as the counts of the different alarms. You'd configure your custom DR with the big string PI tag as input parameter, together with some specs on what you'd like to get out of it - then you'd be able to get data presented directly in an AF Attribute without further needs for analyses or extra PI tags being created.

Children
No Data