AdvancedHMI Software
General Category => Open Discussion => Topic started by: mr14 on May 29, 2017, 08:44:34 AM
-
Hi
How can I set an item to be invisible if the is no communication with the PLC it is related to?
-
What driver are you using?
-
MODBUS_TCP
-
See if this works:
Private Sub ModbusTCPCom1_ConnectionEstablished(sender As Object, e As EventArgs) Handles ModbusTCPCom1.ConnectionEstablished
Label1.Visible = True
End Sub
Private Sub ModbusTCPCom1_ComError(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles ModbusTCPCom1.ComError
Label1.Visible = False
End Sub
-
Ok, it is working but for some reason t doesn't work on the main form.
What could be the reason?