This has caused some hair loss this week. Trying to connect to each member of a 4 member collective and check current value of one tag.
Here is my connection logic... It will connect to two of the four servers. Why only two?
Dim pisdkserver As New PISDK.PISDK Dim srv As PISDK.Server Dim servername As String = Nothing Dim Col As IPICollective Dim colList As CollectiveList Dim colMember As CollectiveMember For i = 1 To 4 If i = 1 Then servername = "API01-AR" srv = pisdkserver.Servers(servername) ElseIf i = 2 Then servername = "API02-BR" srv = pisdkserver.Servers(servername) ElseIf i = 3 Then servername = "BPI01-AR" srv = pisdkserver.Servers(servername) ElseIf i = 4 Then servername = "BPI02-BR" srv = pisdkserver.Servers(servername) End If Col = srv If (Col.IsCollectiveMember()) Then colList = Col.ListMembers colMember = colList(servername) srv = Col.MemberOpen(colMember, servername) Else srv.Open() End If Do 'Go get value from collective member 'Some camparisons going on Loop srv.close Next