Author Topic: DataChangedCallBack Error  (Read 1856 times)

andrew_pj

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
DataChangedCallBack Error
« on: November 17, 2015, 11:17:07 PM »
Hi,

I use V399a, and OpcDaCom communication.
I got error (DataChangedCallBack) everytime calling Application.exit()
I already put try catch statement though but doesn't stop the error.

Please advise regarding this, refer to attachment for details.
Thank you.

Best regards,
Andrew

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: DataChangedCallBack Error
« Reply #1 on: November 18, 2015, 12:12:43 AM »
It looks like a fix was put in for this for the next version:
Code: [Select]
    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
            Try
                PolledAddress = DirectCast(values(i).ClientHandle, PolledAddressInfo)
            Catch ex As Exception
                Exit Sub
            End Try

andrew_pj

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: DataChangedCallBack Error
« Reply #2 on: November 18, 2015, 12:55:03 AM »
It looks like a fix was put in for this for the next version:
Code: [Select]
    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
            Try
                PolledAddress = DirectCast(values(i).ClientHandle, PolledAddressInfo)
            Catch ex As Exception
                Exit Sub
            End Try

Solved! Thank you.