See if this code works for you:
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.