_ack_time blank on \"went\" alerts

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
7 posts • Page 1 of 1
jimtaylor
Posts:32
Joined: Tue Jun 11, 2013 10:18 am

_ack_time blank on \"went\" alerts

Post by jimtaylor »

Hi,

Does anyone know if there a way to construct a dpQueryConnectSingle() to return the _ack_time for "went" alerts? In the code below the ack time is populated if the sequence is came->ack or came->went->ack but is null at the went stage if the sequence is came->ack->went.

Thanks,

Jim

Code: Select all

main ()
{  
  string sql = "SELECT ALERT '_alert_hdl.._came_time', '_alert_hdl.._ack_time', '_alert_hdl.._gone_time' FROM '*.Alarms.*' ";
  dpQueryConnectSingle("alarmsCB", FALSE, "temp", sql);
}

void alarmsCB(anytype ident, dyn_dyn_anytype returnValues)
{
  for (int i = 2; i ACK & CAME->WENT->ACK
    // but is null for CAME->ACK->WENT
  }
}

joost.lijster@siemens.com
Posts:19
Joined: Wed Sep 21, 2016 1:51 pm

Re: _ack_time blank on \"went\" alerts

Post by joost.lijster@siemens.com »

Hi Jim,

Sounds logic, since the went event was not acknowledged, but the came event. Luckily for you, these two are 'partners'.

Take a look at the partner of the alert. In your query, also connect to the '_alert_hdl.._partner' attribute, you'll notice the following:

Instead of only 2 items (header and went alert), you will receive a third item: the partner of the alert that went, which in your case is the CAME ACKED alert. Since this is the one you acked (and not the went alert), this one will have the acked time.

Cheers,

Joost

Image
Attachments
ack_partner_small-20170406.png
ack_partner_small.png

jimtaylor
Posts:32
Joined: Tue Jun 11, 2013 10:18 am

Re: _ack_time blank on \"went\" alerts

Post by jimtaylor »

Hi Joost,

Great tip, I new about the _partner attribute but had not appreciated that it would be populated in the came alert too and hence fire the callback.

Thanks,

Jim

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

Re: _ack_time blank on \"went\" alerts

Post by leoknipp »

In the WinCC OA documentation you can find the chapter Reference tables --> Datapoint configs --> _alert_hdl
At this table describing all attributes for the _alert_hdl config you can find the information for changes at which attribute a callback is triggered.

Best Regards
Leopold Knipp
Senior Support Specialist

a_labropoulos@akatt.gr
Posts:25
Joined: Sun Nov 06, 2016 2:02 pm

Re: _ack_time blank on \"went\" alerts

Post by a_labropoulos@akatt.gr »

Hello!
I have a similar problem with Jim. I am using standar filters ( Image )to my AES Screen and i have also add a new column with alert_hdl_..partner time( Image ).
My problem is that WENT time is null for alarms (5 ranges alert handling) when the sequence is came->ack->went. When the sequence is came->went->ack works corect.

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

Re: _ack_time blank on \"went\" alerts

Post by Gertjan van Schijndel »

I see the image of the alert panel filter configuration twice. So I do not know how you have configured the new column.

Perhaps you could try the '_gone_time' attribute.

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

Re: _ack_time blank on \"went\" alerts

Post by leoknipp »

I've tested both sequences (came->ack->went and came->went->ack) and in both situations the _partner_time attribute contained the correct information when doing a historical request for the alerts.

Best Regards
Leopold Knipp
Senior Support Specialist

7 posts • Page 1 of 1