Get unacknowledged alarms

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
7 posts • Page 1 of 1
dbindernagel
Posts:161
Joined: Mon Feb 23, 2015 1:34 pm

Get unacknowledged alarms

Post by dbindernagel »

I need to write to a DPE the acknowledge status of all alarms:
No unacknowledged alarm = false
At least one unacknowledged alarm = true

I thought this would be easy but I'm stuck.
The only way to get this, that I can think of, would be to use "dpQueryConnectAll" which should not be used with a "SELECT ALERT..." because of perfomance reasons.

Is there a easy/better way to solve my problem that I'm missing?

Code: Select all

void main()
{
  string query = "SELECT ALERT '_alert_hdl.._ackable' FROM '*'";
  dpQueryConnectAll("AckPossibleCB", true, "ident", query);  
}

void AckPossibleCB(string ident, dyn_dyn_anytype val)
{
  bool unacknowledgedAlerts = false;

  for (int i = 2; i

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Get unacknowledged alarms

Post by leoknipp »

there is probably an easy solution available for this requirement.
It can maybe be solved with a summary alert where the pattern "*" is defined for the datapoint list.
Before using this solution in a productive environment please check if the project is still working properly if a lot of alerts are raised/deleted in a short period of time.

When using a query you have to implement on your own the counter for the alerts, similar to the functions executed by the AEScreen.
When an alert is raised it is added to a list. When the alert is gone, the entry from the list is removed. If the list does not contain any entries there are no pending alerts.

As you have already detected on your own dpQueryConnectAll() in combination with SELECT ALERT shall not be used.

Best Regards
Leopold Knipp
Senior Support Specialist

dbindernagel
Posts:161
Joined: Mon Feb 23, 2015 1:34 pm

Re: Get unacknowledged alarms

Post by dbindernagel »

the sum alert solution with with the "*" pattern does not work. A new, not acknowledged alarm, with a lower priority does not mark the sum alert as not acknowledged again.
I also had problems if the dp were already in the dp list of another sum alert.

I will try the query solutiuon but it seems to me this can't be done without having some significant amount of load on the project.

Thanks for the help.

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Get unacknowledged alarms

Post by Gertjan van Schijndel »

Did you change the alarm order of the sum alert to 'State before priority'?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Get unacknowledged alarms

Post by leoknipp »

Hello,

the AEScreen or AESRow with a filter for all dp-elements does the same like a query with '*' as FROM statement.
Therefore the load for the system should not be a problem.

Best Regards
Leopold Knipp
Senior Support Specialist

dbindernagel
Posts:161
Joined: Mon Feb 23, 2015 1:34 pm

Re: Get unacknowledged alarms

Post by dbindernagel »

Hello,

@ Gertjan van Schijndel:
No, I forgot to change this setting.
This solves the problem with the new alarms.
Thanks.

I still have the problem that the sum alert with "*" pattern does not work.
This seems to be a version problem.
In a WinCC OA 3.13 demo project it works fine.
In a WinCC OA 3.10 demo project I can't get the sum alert to work.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Get unacknowledged alarms

Post by leoknipp »

Hello,

I tested it with 3.13 and 3.10 and in both versions a summary alert with a dp-pattern "*" does not work.
You would have to define a pattern *.** to address the dp-elements correctly.
But in that case a recursion will be configured and the summary alert cannot be activated.

I don't see this as a bug as such a summary alert will not be configured in a common plant system.

To get a summary alert which fits the datapoint names in your project you have to define a suitable pattern.
E.g. if all plant specific datapoints start with "ABC" you define the pattern "ABC*.**" for the summary alert at a datapoint starting with "Alert". Then no recursion is defined.

Best Regards
Leopold Knipp
Senior Support Specialist

7 posts • Page 1 of 1