|
|
Rank: Member Groups: Member
Joined: 8/26/2009 Posts: 10 Location: Canada
|
Hi there,
Here is some background of what I am doing:
I have a windows service running on a server that uses EventPipes to retrieve events from the PI server. When the service starts it connects to a database to get the list of tags to "listen" to on the PI server. Once the service has the list, it connects to the PI Server and establishes the EventPipe for each of the tags.
The tags that I am monitoring on the PI server are all fed by PLCs. So basically, the PLCs communicate with the PI Server and the PI Server communicates with my service.
Everything was working fine until we tested cutting the communication between the PLC and the PI Server.
The PLC buffers its information correctly until such time as communication is re-established with the PI Server. Once the communication was re-established, the PLC pushed all of its info into the server.
While the communication was cut, the Digital State "Bad Input" was written to the PI Server for the tags in question.
My service received the "Bad Input" event values and ignored them but when the communication was re-established and the PLC values were pushed into the Server, my service did not receive any events. Any subsequent data written to the server did not produce any events either.
When my service was restarted, events started coming in again.
So, my question is...is it possible that something happended to the EventPipe while the PLC was disconnected and that the EventPipe was no longer notifying my service? If so, is there a way to tell if an EventPipe is connected to the server and is actively listening for new events?
Can anyone think of another reason why the events would start coming in again after restarting the service?
Regards, Joel.
|
|
|
|
|
OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System. We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ or contact OSIsoft vCampus for more details.
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 612 Location: Cheshire, United Kingdom.
|
Hi Joel, If your eventpipes become disconnected, then you can test by calling any of the methods - you would get a disconnected error. You could add a monitoring thread to your service to check your eventpipes - if they error, then recreate them. Causes in your situation I am not entirely sure off the top of my head. Maybe an unhandled error or your pipes getting blocked? e.g. default maximum count for events is 10,000 did you change this to a lower number? Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Member Groups: Member
Joined: 8/26/2009 Posts: 10 Location: Canada
|
Hey RJK,
No, I have left all of the defaults as is. I am only creating the EventPipe and then listening to it.
Would accessing a property (for example, the Count) generate the disconnected error or only one of the methods like Take?
I am not even sure if it is the EventPipe that is causing the problem. At this point in time I know that restarting the service (which recreates all of the connections and eventpipes) clears up the problem.
Unfortunately clients generally tend to look down upon any solution that requires rebooting a service in production! :-)
Thanks for the info.
I will try to add something that mointors the Count property and any errors generated. If cutting the PLC connection causes an error it will show up here. If not...
Regards, Joel.
|
|
|
|
Guest
|