AdvancedHMI Software

General Category => Open Discussion => Topic started by: mr14 on May 29, 2017, 08:44:34 AM

Title: How to make an item be invisible if no communication with PLC
Post 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?
Title: Re: How to make an item be invisible if no communication with PLC
Post by: Archie on May 29, 2017, 09:00:06 AM
What driver are you using?
Title: Re: How to make an item be invisible if no communication with PLC
Post by: mr14 on May 29, 2017, 09:09:17 AM
MODBUS_TCP
Title: Re: How to make an item be invisible if no communication with PLC
Post by: Archie on May 29, 2017, 09:22:03 AM
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
Title: Re: How to make an item be invisible if no communication with PLC
Post by: mr14 on June 01, 2017, 02:36:06 AM
Ok, it is working but for some reason t doesn't work on the main form.
What could be the reason?