kevintmoon

IPICalculation.Calculate() method always returns two values

Discussion created by kevintmoon on Aug 21, 2009
Latest reply on Aug 24, 2009 by kevintmoon

Hello,

 

FYI, I use PI Server v3.4.375.80 , and PI SDK v1.3.6 build 361.

 

The following is the screenshot of the pi tag

 

 

 

 

 

IPICalculation.jpg

 

 I extract the data using IPICalculation.Calculate() method as the code below (The Pascal Delphi code…)

 

var
  PIVals2    : PIValues;      // IPICalculation interface declaration
  PICalc    : IPICalculation; // the collection of PI Value declaration

begin

// some code…

PICalc.Calculate('18-Aug-2009 09:19:00', '18-Aug-2009 09:20:00', 'PrevVal(''cimahi'', ''18-Aug-2009 09:20:00'')', stRecordedValues, '', nil, PIVals2);

// some code…

end;

 

PIVals2 returns two value, and both of them are 3.
The PIVals2 always returns two values, no matter what the input is. Is it correct? Or was it me who gave the incorrect input?
My client needs only one value to be returned. FYI, this is also happen with “NextValue”, and “TagVal” expression. 

 

Thanks in advance for your support and I look forward for your response.

Outcomes