@John: UpdateValues method is meant to allow bulk calls, so you can write/update many values at the same time (meaning a single RPC call to the PI Data Archive). The new PI Data Archive 2012 can sustain an input rate of 1 million events per second (and more). Although, this is not 1 million RPCs this needs to be done the right way. Bulk methods should be used to allow this. How many values are stored within your PIValues object?
You are saying that the delay of 15-16 ms is causing issue with your application, what do you mean? Are you trying to control a loop? a piece of equipment? The PI System should not be considered as a control system to turn on/off or shutdown equipment that might be critical. The event flow of the PI System is not deterministic and does not offer a guarantee of feedback of the equipment you want to control.
The variation of time you would notice for the calls to complete is multiple:
- network latency
- connection failover if used with a high availability PI Data Archive
- buffering enabled
- disk I/O
- machine resources
To improve the performance there are many options that you have. I suggest you take a look at this white paper on optmizing PI SDK applications. Also, you can do the same with AF SDK (RDA). You can easily do a search on vCampus to find many posts on the subject.
To get 100 calls per second using PI SDK UpdateValues you must be buffering already, and that timing will be the timing for the PI SDK to offload to the values to the local buffer queue. The timing won't be for the data to hit the PI Server in that scenario. Even if the timing is for direct to PI Server, is the PI Server on the same node?
Sounds like a FFT type interface based on data rates...
Thank you for your comments.
The PI Server and my application are running on different machines. It looks like I need to do more investigation regarding my use of the UpdateValues() function and the amount of values I am passing to each function call.
If you want to improve the performance of your application switching to PI AF SDK, I recommend you watching this webinar first. You can download its source code package and refer to the VS solutions attached to the compressed file.
Hope this helps you!
Thank you very much for your comments, they are very helpful.
I am storing only one or two values within the PIValues object.
In relation to the 15-16ms delay, I am not trying to control a loop or a piece of equipment. The delay is causing a problem because the application cannot keep up with the number of analogue updates I am experiencing on the production SCADA system.
It sounds like you are not surprised I am getting 100 calls per second. Maybe I need to do some caching in my application to reduce the number of calls to UpdateValues(), include more values in each call.
I have browsed the white paper in the past, I will read it again in more detail.
I have read about the AF SDK in the past and the function allowing multiple tags and multiple values to be provided looks very useful.