In my form load, I have the followings:
InitializeCombo()
'Dim dt As Date = PLC.ReadClock
Application.DoEvents()
System.Threading.Thread.Sleep(200)
If PLCIsConnected Then
PLC.Write("FromPC_Reset", 1) 'From PC Reset
Sleep(250)
PLC.Write("FromPC_Reset", 0)
Else
MessageBox.Show("PLC IS DISCONNECTED", "PLC WARNING", MessageBoxButtons.OK, MessageBoxIcon.Hand)
End If
This same code works with EthernetIPforSLCMicroCom1, but not with EthernetIPforCLXCom1. I even tried a ReadClock, my variable got the clock time, and yet it always display PLC is disconnected msg.
Private Sub PLC_ConnectionEstablished(sender As Object, e As EventArgs) Handles PLC.ConnectionEstablished
PLCIsConnected = True
End Sub
TIA