YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

EventPipe events are being triggered even if the value being written has not changed Options · View
jfaigan
#1 Posted : Monday, January 11, 2010 3:21:23 PM
Rank: Member
Groups: Member

Joined: 8/26/2009
Posts: 10
Location: Canada
I have a C#.Net service that connects to a PI server and subscribes to the EventPipes of several tags.

My event handler is being fired even though the value on the server has not changed. (Ex. If the current value is 1 and I write 1 to the server, my event will be triggered.) Is there a way to have the event pipe fire only when the value has changed?

Regards,
Joel.
Sponsor  
 
Michael
#2 Posted : Monday, January 11, 2010 4:32:50 PM
Rank: Advanced Member
Groups: Member

Joined: 12/3/2009
Posts: 71
Location: Germany/Pennsylvania
Joel,

I suppose you’re listening to all events (snapshot and archive) using PIData.EventPipe. In this case it is correct that you receive all events for a tag.

If you want the see the events with "new" values, let the server do the compression and use IPIData2.ArchiveEventPipe instead.

This should solve your problem, if your tag is configured properly.

Remember this solution is not perfect, it depends on the compressing settings of your tag (especially compmax attribute)


Michael
jfaigan
#3 Posted : Monday, January 11, 2010 5:58:12 PM
Rank: Member
Groups: Member

Joined: 8/26/2009
Posts: 10
Location: Canada
Hi Michael,

Thanks for the info. Much appreciated.

Regards,
Joel.
RJK Solutions
#4 Posted : Tuesday, January 12, 2010 9:51:07 AM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 458
Location: Cheshire, United Kingdom.
Just note that even though your event pipe fires but there appears to be no new value, it is not always the case. You will likely be getting a value but with a newer timestamp (or an out of order event), which is perfectly reasonable.


OSIsoft PI System Specialists
PI consultancy on PI Systems, PISDK, AFSDK, OLEDB etc and PI custom developments. Well pretty much anything to do with PI!


jfaigan
#5 Posted : Tuesday, January 12, 2010 1:21:00 PM
Rank: Member
Groups: Member

Joined: 8/26/2009
Posts: 10
Location: Canada
Thanks for the update. I am not well versed in PI but I am learning! :-)

The effect I am looking for is: notification only when the value has actually changed. What we have, as far as I understand, is a PI node that is pulling info out of PLCs every second therefore, my event is firing every second even though the data in the PLC has not changed.

I have altered my code so that it keeps track of the last value received for a data point. Each time I receive the event, I check with the collection to see if the value has changed.

This is not an optimal solution as the event is still raised once per second for each data point I am monitoring.

Regards,
Joel.
Michael
#6 Posted : Tuesday, January 12, 2010 6:17:13 PM
Rank: Advanced Member
Groups: Member

Joined: 12/3/2009
Posts: 71
Location: Germany/Pennsylvania
Yes, therefore I wrote "the solution is not perfect".

You can reduce the amount of events send to the snapshot subsystem by changing the exception-reporting specifications, if applicable. (check ExcMax and ExcDev attributes)

Michael
jfaigan
#7 Posted : Tuesday, January 12, 2010 6:35:43 PM
Rank: Member
Groups: Member

Joined: 8/26/2009
Posts: 10
Location: Canada
Hi Michael,

When I said the solution was not optimal...I meant my solution of checking the previous value in a collection, not yours. No offence was meant.

I am looking into the Exception Deviation value as we speak so that the values do not come in every second but rather say every 10 minutes.

I tried using the Archive Event but the values are not pushed into the archive fast enough for my needs; there is too much of a delay between the value being written to the snapshot and then to the archive.

I will try with the regular Event Pipe, the Exception Deviation and my solution of checking the previously received value. Hopefully this combination will provide me with the best possible results.

Thanks for the help.

Regards,
Joel.
Michael
#8 Posted : Tuesday, January 12, 2010 7:24:23 PM
Rank: Advanced Member
Groups: Member

Joined: 12/3/2009
Posts: 71
Location: Germany/Pennsylvania

Joel,

don't worry. There was no misunderstanding.

I suggested to use ArchiveEventPipe because of two reasons:
1) You receive events every minute. But if most of the events are never send to archive and you need the information in real-time you can't use the ArchiveEventPipe .
2) When to treat a value as a changed one? (in case of a digital or string tag it's easy, but if you have numbers...). In such a case you have to introduce a suppressing mechanism, which is already there.

What pointtype (numeric or digital) you have to monitor and how ExcMax and ExcDev are set?

Michael
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.