Author Topic: Data Subscriber Question  (Read 11214 times)

ENA

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • ENA
Re: Data Subscriber Question
« Reply #15 on: September 15, 2014, 08:58:30 AM »
See if this code works for you:
Code: [Select]
        Try
            Dim Result As Integer
            If Integer.TryParse(e.Values(0), Result) Then
                GlobalVariables.cs_tel = ((Result And 1) > 0)
            Else()
                MsgBox("Error in value " & v)
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

Thank you Archie.

I modified my code similar to the way you suggested and it works, application continues to work normally. Also, your code suggestion is a bit more elegant than my old code.

However, there is now a new problem, I believe unrelated to data subscriber.

The setup is: two Micrologix 1400 and a PC connected via ethernet. Every PLC has a its own driver in PC application. My test was, what happens when I physically disconnect the cable connecting one PLC. First thing was, I got the error, which we now resolved. But now, when I reconnect the cable to the PLC, it seems that ethernet driver doesn't reconnect with that PLC and communication between PC and PLC cannot be continued.

DougLyons

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Data Subscriber Question
« Reply #16 on: November 01, 2014, 12:22:25 PM »
Based on my testing of version 3.80 the extra Data Changed event that caused the double entries is now fixed.
Congratulations on a Job Well Done.

Thanks for giving us Advanced HMI.