AnsweredAssumed Answered

Reading ONLY Raw values using PI SDK

Question asked by Salman@GE on Dec 3, 2015
Latest reply on Dec 3, 2015 by Marcos Vainer Loeff

In my application which is developed using C++, I am trying to read PI point values periodically in a polling fashion i.e., for every x seconds I will check is there any raw data sample available for a PI point. If so, I will add that raw data sample to my application.

 

I am using RecordedValues PI SDK API to read the value. Following is the code snippet

 

//pServerPtr is the PI Server connection pointer.

_PointListPtr pts = pServerPtr->GetPoints(_T("pointid = '3' "),NULL);

_variant_t tempIndex = 1;

PIPointPtr pt = pts->GetItem(&tempIndex);

_variant_t vStartTime = UTCStartTime;

_variant_t vEndTime = UTCEndTime;

 

_PIValuesPtr pVals = pt->Data->RecordedValues(vStartTime,vEndTime,btInside,"",fvUseExpressionTimes,NULL); 

 

Is this the right API to read Raw values?

 

I am using the Archive Editor in the PI SMT tool to cross check the PI Raw samples against the data stored in my application. They are not matching. I am seeing some extra data samples in my application.

 

Is there a chance that RecordedValues API returns interpolated value even if the raw sample is not available for the given time frame (between vStartTime & vEndTime)?

Is Archive Editor (PI-SMT) is the right tool to be consider as the source of truth to cross check for raw values?

Outcomes