Hi,
I am building a processbook that will display events based on an event pipe in a list box using PB 3.2.3.0 with PI SDK 1.3.6.363
I have some code which looks like this which will build the eventpipes.
Private Sub ConstructEventPipes() On Error GoTo errHandle Dim objAlarm As PISDK.pipoint Dim i As Integer Set EventPipes = New Collection Set objEvents = New Collection For i = 1 To AlarmList.Count Log "Getting Event Pipe " & i & " of " & AlarmList.Count, "alarms.ConstructEventPipes" EventPipes.Add AlarmList.Item(i).Data.EventPipe VBA.DoEvents Next errHandle: If Not err.Number = 0 Then Log err.source & ": " & err.Description, "alarms.ConstructEventPipes" On Error GoTo 0 End Sub
This works well over a local connection to the PI Server. With higher latency links the code gets exponentially slower through the for next loop.
Any suggestions on a better way to do this, or improvements to the existing code?
Thanks
Hi,
Realised my error here :-)
Best use one event pipe with a collection of points to monitor, something like this
Much quicker now.