AnsweredAssumed Answered

Can you advise how I can read Pi Points from the secondary Pi server the below syntax works and returns data but checking in SMT shows the connection is on the Primary.

Question asked by erobinson on Jan 27, 2016
Latest reply on Mar 25, 2016 by jsoulis

Dim Ph3_PiSrv As OSIsoft.AF.PI.PIServer

Ph3_PiSrv = New OSIsoft.AF.PI.PIServers().Item(“DOCWAPPH026”)

If ((Ph3_PiSrv.Collective) Is Nothing Or Not (chkSecondary.Checked)) Then

      Ph3_PiSrv.Connect()

Else     
     Ph3_PiSrv2nd = Ph3_PiSrv.Collective.Members(1)
     
     Ph3_PiSrv = Ph3_PiSrv2nd.ConnectDirect

End If

criteria = New List(Of IEnumerable(Of PIPointQuery))

ptMeterQuery = New PIPointQuery("Tag", Search.AFSearchOperator.Equal, "Unity*.Value")

criteria.Add({ptMeterQuery})

Meter = PIPoint.FindPIPoints(Ph3_PiSrv,criteria)

Outcomes