Aantje

Summary method in PI ACE

Discussion created by Aantje on Mar 22, 2011
Latest reply on Mar 22, 2011 by spilon

Hi there,

 

I'm trying to use the Summary method in PI-ACE, but can't get the job done (I must say that I'm not the greatest programmer in the world )

 

This is my code, but I get an error message during debugging, so what going wrong?

 
Dim sdk As New PISDK.PISDK
Dim srv As Server
Dim ipiCalc As IPICalculation

Dim PI_point_Aktiv As PIPoint
Dim pdata_Aktiv As PIData
Dim ipid2_Aktiv As IPIData2
tagnameAktiv = TE_Name & ".Aktiv"

srv = sdk.Servers(PIServer)
ipiCalc = srv

PI_point_Aktiv = srv.PIPoints(tagnameAktiv)
pdata_Aktiv = PI_point_Aktiv.Data
ipid2_Aktiv = pdata_Aktiv

Dim AktivAverage As PIValue
AktivAverage = ipid2_Aktiv.Summary(dblStarttime, dblStarttime + 900, ArchiveSummaryTypeConstants.astAverage, CalculationBasisConstants.cbTimeWeighted)

 Debugging stops at the "AktivAverage = ipid2_Aktiv.Summary" part. The message is: Unable to interpret the variant type as a time.

 

Greetz, Arie

Outcomes