Author Topic: Using PLCAddressVisible with FormChangeButton  (Read 1574 times)

scott.clark

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Using PLCAddressVisible with FormChangeButton
« on: October 30, 2015, 07:35:41 PM »
Using AdvancedHMI 3.99a

I am having an issue hiding the a FormChangeButton using the PLCAddressVisible property.

I have a Bool type variable in the PLCAddressVisible property and have selected the CommComponent EthernetIPforCLXCom1. but the state of the PLCAddress has no effect. 

I know the PLC address I am using is good, tested it with the PLCAddressVisible property for a BasicButton.  Any ideas?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Using PLCAddressVisible with FormChangeButton
« Reply #1 on: October 30, 2015, 07:49:26 PM »
I can't believe that slipped through so long without getting reported.

Add this code to FormChangeButton.vb
Code: [Select]
    Protected Overrides Sub OnHandleCreated(e As EventArgs)
        MyBase.OnHandleCreated(e)

        SubscribeToCommDriver()
    End Sub

Then make sure ComComponent property is set


scott.clark

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: Using PLCAddressVisible with FormChangeButton
« Reply #2 on: October 30, 2015, 08:12:12 PM »
Works like a charm!