Hi Everyone,
I am currently facing a strange problem with PI, and maybe that one of you could have some ideas to help me...
I have developped a tool using Excel VBA and that has been deployed in different countries in Europe / US / Asia on different computers.
And it works fine everywhere, except in US...
The tool uses PISDK, and get PI values using this line of code :
PI_results = Application.Run("PIAdvCalcDat", sTagname, Start_Time, End_Time, Interval, "average", "time-weighted", Percent_Good, Cfactor, Outcode, sServer)
Depending of the number of results (from the time range and interval), the result can be an array of results.
On most of computer, it gives the results correctly in the array, results being the date and the value, in a "double" format.
But in US, depending of the size of the array, sometimes it works, sometimes not:
if the result is a single value (array of 1 line 2 columns), it works fine
if the result is an array of several values (several lines, 2 columns), the result is an array of the correct size but with empty values in the array, in a "string" format, for both dates and values...
The arguments of the code looks ok and are from the correct type (strings for times, tag, server, interval).
For information, the version of PI Datalink is different on US computers:
Here in Europe we use PI Datalink 2010
In US they use PI Datalink 2013
Could it be the reason of the problem ?
Or any other idea of the causes of this problem ?
Thank you in advance for your help !
Vincent