pyeska@tibco.com

C++ get snapshot from PI Points

Discussion created by pyeska@tibco.com on Aug 22, 2012
Latest reply on Nov 23, 2012 by andreas

Hi,

 

Please review code below. I'm not able to get Point Value from Point Values collection. ptValues.Count is two, as I expected. ptValue is NULL.

 

Thanks!

 

 

 
spPointList.CreateInstance(__uuidof(PointList));

// add sinusoid
spPointList->Add(spPIPoint);
// add sinusoidu
spPointList->Add(spPIPoint2);

spListData = spPointList->Data;

// get snapshots
spValues = spListData->GetSnapshot(&spNV);

if (spNV->Count > 0)
{
     std::cout << "Error occurs!" << std::endl;
}
else {
        std::cout << spValues->Count << std::endl;
     for (int i=1; i <= spValues->Count; i++)
     {
          spValue = spValues->GetItem(i);
          
     }
}

 

 

 

 

 

Outcomes