Having a little trouble getting the forum to load this morning!
I thought I should specify: even when ReadAny() is failing the components on the form (BasicLabels, BasicIndicators) still function properly.
The code inside a try/catch:
Dim profile_points1(50) As String 'read times out trying to pull all 100 points in one shot
Dim profile_points2(50) As String 'so break it into 2 separate arrays & calls
'ListBox1.Items.Clear()
profile_points1 = plc_clx.ReadAny("Program:HEAD_" & (currentHead + 1) & ".PARISON_CPT[0]", 50)
Dim i As Integer = 0
If validateReturnedArray(profile_points1) Then
For i = 0 To 49
currentProfilePoints(i) = profile_points1(i)
'ListBox1.Items.Add(i & ":" & profile_points1(i))
Next
profile_points2 = plc_clx.ReadAny("Program:HEAD_" & (currentHead + 1) & ".PARISON_CPT[50]", 50)
If validateReturnedArray(profile_points2) Then
comAttemptCount = 0
For i = 0 To 49
currentProfilePoints(i + 50) = profile_points2(i)
' ListBox1.Items.Add((i + 50) & ":" & profile_points2(i))
Next
Else
comAttemptCount = comAttemptCount + 1
MessageBox.Show(errMsg, "bad array caught in profile loop 2. (" & comAttemptCount & ")")
'resetCom()
readParsionValues()
End If
Else
comAttemptCount = comAttemptCount + 1
MessageBox.Show(errMsg, "bad array caught in profile loop 1. (" & comAttemptCount & ")")
'resetCom()
readParsionValues()
End If
comFaultCount = 0