AnsweredAssumed Answered

How to get compress-data using PISDK

Question asked by BBS318 on Apr 18, 2019
Latest reply on May 13, 2019 by BBS318

Hi All,

 

Could you please help me get get compressdata using PI-SDK.

 

Data required in the below format

     

66QA103B
17-Apr-19 18:30:008.2
18-Apr-19 00:30:0011
18-Apr-19 08:20:007.6
18-Apr-19 10:50:0012.5

 

Here is my code but it is not working, getting error at piPtVal as below

 

Unable to cast COM object of type 'System.__ComObject' to interface type 'PISDK.PIValue'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{F293A839-D998-11D3-853F-00C04F45D1DA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."}

 

 

MY CODE
           Dim piPtVal As PISDK.PIValue = New PISDK.PIValue

            Dim piStartTime As PITimeServer.PITime = New PITimeServer.PITime

            Dim piEndTime As PITimeServer.PITime = New PITimeServer.PITime

            piStartTime.LocalDate = dtStartDateTime

            piEndTime.LocalDate = dtEndDateTime

            If (_srv Is Nothing) Then

                Connect_To_PI()

            End If

           piPtVal = _srv.PIPoints(PITagName).Data.RecordedValues("-1d", "*", PISDK.BoundaryTypeConstants.btAuto, "", PISDK.FilteredViewConstants.fvShowFilteredState, Nothing) '.Summary(piStartTime, piEndTime, PISDK.ArchiveSummaryTypeConstants.astAverage, PISDK.CalculationBasisConstants.cbEventWeighted, Nothing)

 

Regards

Bibhuti Swain

Outcomes