PixxUI.PISummariesDataDuration
Description
Query for PI summaries data over an evenly spaced interval given by an interval duration.
Parameters
App As Application | Tags() As String | Smry As ArchiveSummaryTypeConstants |
Servers() As String | StartDate As Variant | CalcBasis As CalculationBasisConstants |
Users() As String | StopDate As Variant | GoodOnly As Boolean |
Passwords() As String | Duration As String |
SVB Example
' References required
' PixxAddin 1.0 Type Library (1.0)
' PISDK 1.3 Type Library (1.0)
' PISDKCommon 1.0 Type Library (1.0)
Option Base 1
Const g_nTags = 5
Sub Main
Dim PiConn As PixxUI
Set PiConn = AddIns.AddIn("PixxAddin.PixxUI.1")
Dim aServers(g_nTags) As String
Dim aUsers(g_nTags) As String
Dim aPwds(g_nTags) As String
Dim nItem As Integer
For nItem = 1 To g_nTags
aServers(nItem) = "PISERVER"
aUsers(nItem) = "piadmin"
aPwds(nItem) = ""
Next nItem
Dim aTags(g_nTags) As String
aTags(1) = "BA:ACTIVE.1"
aTags(2) = "BA:TEMP.1"
aTags(3) = "BA:CONC.1"
aTags(4) = "BA:LEVEL.1"
aTags(5) = "BA:PHASE.1"
Dim w As Workbook
On Error Resume Next
Set w = PiConn.PISummariesDataDuration(Application,aServers,aUsers,aPwds,aTags,"y","t",6m,asAverage,cbTimeWeightedContinuous,True,False)
If Err.Number <> 0 Then
MsgBox Err.Description
Exit Sub
End If
w.Visible = True
End Sub