It was not enough to change this row:
If String.Compare(SubscriptionList(k).Symbol.Name, plcAddress, True) = 0 And SubscriptionList(k).dlgCallBack = callback Then
But I tried to change also the first if-statement to this:
If UsedSymbols.Count > 0 Then
For k = 0 To SubscriptionList.Count - 1
If String.Compare(SubscriptionList(k).Symbol.Name, plcAddress, True) = 0 And SubscriptionList(k).dlgCallBack = callback Then
SubExists = True
Exit For
End If
Next
End If
Then there is no duplicates made in the subscription list.
I still have too many calls to DataReturned in my main application (test application seems to be ok now). But I ssupect my own written AlarmSubsctiption routine, so I have to dig more into it.
Another issue:
After working a while in the application (Happened in both my main app and my test app) I get following "Object does not match target type" in the Collection editor for plcadress in DataSubscriber2. I have got it working again in a few different ways, but the most effective and so far permanent solution has been to comment this row out:
'<System.ComponentModel.TypeConverter(GetType(PLCAddressItemTypeConverter))> _
from PLCAddressItem.vb
In the test app I have not made any new controls or changes to Adv.HMI code besides what have been discussed above in this forum-thread, but anyway I got the "Object does not match target type"