Trying to do some troubleshooting myself by using breakpoints, I have found that the slow connection comes in at line 423
SubscriptionOPC = DirectCast(DLL.CreateSubscription(SubscriptionState), Opc.Da.Subscription)
AddHandler SubscriptionOPC.DataChanged, AddressOf DataChangedCallBack
Catch ex As Exception
Dim dbg = 0
End Try
End If
After getting through this, a value will appear.
The update problem I can't figure out. The local opc server and remote opc server both go through the DataChangedCallBack at line 520.
Private Sub DataChangedCallBack(ByVal clientHandle As Object, ByVal requestHandle As Object, ByVal values() As Opc.Da.ItemValueResult)
For i = 0 To values.Length - 1
Dim ReturnedValues() As String = {Convert.ToString(values(i).Value)}
Dim PolledAddress As PolledAddressInfo = DirectCast(values(i).ClientHandle, PolledAddressInfo)
'For j = 0 To Subscription.Items.Count - 1
'If PolledAddress.OPCItem.ItemName = DirectCast(Subscription.Items(j).ClientHandle, PolledAddressInfo).OPCItem.ItemName Then
Dim PLCAddress As String = values(i).ItemName
'* If there is a Topic, strip it back off before sending back to subscriber
If m_OPCTopic IsNot Nothing AndAlso Not String.IsNullOrEmpty(m_OPCTopic) Then
PLCAddress = PLCAddress.Substring(m_OPCTopic.Length + 2)
End If
Dim x As New MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs(ReturnedValues, PLCAddress, 0)
x.SubscriptionID = PolledAddress.ID
Dim z() As Object = {Me, x}
m_SynchronizingObject.BeginInvoke(PolledAddress.dlgCallBack, z)
'End If
'Next
Next
The local seems to update the display here, but the remote does not. What am I missing?