AdvancedHMI Software

General Category => Support Questions => Topic started by: andrew_pj on November 17, 2015, 11:17:07 PM

Title: DataChangedCallBack Error
Post by: andrew_pj 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
Title: Re: DataChangedCallBack Error
Post by: Archie 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
Title: Re: DataChangedCallBack Error
Post by: andrew_pj 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.