4 Replies Latest reply on Aug 6, 2012 9:16 PM by Rick Davin

    PISDK PIVALUES Summaries Method






      _SummariesValues As PISDK.PIValues = _point.Data.Summaries(myarraylist.Item(0).item(0), myarraylist.Item(mycount - 1).item(0), BoundaryTypeConstants.btAuto, ArchiveSummariesTypeConstants.asAverage, 1, CalculationBasisConstants.cbTimeWeighted, Nothing)


      Can you please take a look at the Overload arguments and correct it for me.


      I am getting a runtime error on CalculationBasisConstants.cbTimeWeighted  that says: 'PISDK.PIValues'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{F293A83A-D998-11D3-853F-00C04F45D1DA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

        • Re: PISDK PIVALUES Summaries Method



          PIPoint.Data.Summaries returns PISDKCommon.NamedValues - not PIValues.

            • Re: PISDK PIVALUES Summaries Method

              Unfortunately I changed it  to namedvalues and now I am getting the following error:


              Object reference not set to an instance of an object.

                         Dim _point As PISDK.PIPoint = _server.PIPoints("FS_OLA-Calcium")
                         ' PI Point -> Attributes (Descriptor)
                         Dim _descriptor As String = _point.PointAttributes("descriptor").Value.ToString()
                         '("*-10m", PISDK.RetrievalTypeConstants.rtAuto, Nothing)
                         ' PI Point -> Current Value
                         Dim mycount As Integer = myarraylist.Count
                         Dim pdata As New PISDKCommon.NamedValues
                         Dim ipidata As PISDK.IPIData2
                         Dim filtexp As String = "'fs_ola-calcium' <>""Bad"
                         '  Dim _archiveValues As PISDK.PIValues = _point.Data.RecordedValues(myarraylist.Item(0).item(0), myarraylist.Item(mycount - 1).item(0), PISDK.BoundaryTypeConstants.btAuto, "", PISDK.FilteredViewConstants.fvShowFilteredState, Nothing)
                         'Dim _archiveValues As PISDKCommon.NamedValues = _point.Data.Summaries(myarraylist.Item(0).item(0), myarraylist.Item(mycount - 1).item(0), BoundaryTypeConstants.btAuto, ArchiveSummariesTypeConstants.asAverage, 10, CalculationBasisConstants.cbTimeWeighted, Nothing)
                         'Dim _archiveValues As PISDK.PIValues = _point.Data.PlotValues(myarraylist.Item(0).item(0), myarraylist.Item(mycount - 1).item(0), 1, Nothing)
                         pdata = ipidata.FilteredSummaries(myarraylist.Item(0).item(0), myarraylist.Item(mycount - 1).item(0), "1h", "", ArchiveSummariesTypeConstants.asAverage, CalculationBasisConstants.cbTimeWeighted, FilterSampleTypeConstants.fstExpRecordedValues, "10m", Nothing)


                • Re: PISDK PIVALUES Summaries Method
                  Dan Fishman



                  Use the following:

                  Dim ExtendedPIData As PISDK.IPIData2
                  ExtendedPIData = DirectCast(Point.Data, PISDK.IPIData2)
                  pdata =  ExtendedPIData.filtersummaries(...



                  In another sample program I have used filtered summaries using:

                         Dim ipid2 As IPIData2
                         Dim data_point As PIData
                         Point = piserver.PIPoints("BA:LEVEL.1")
                         data_point = Point.Data
                         ipid2 = data_point
                         Results = ipid2.FilteredSummaries(...