Author Topic: EthernetIPforCLXCom problem  (Read 1466 times)

pdonald

  • Newbie
  • *
  • Posts: 4
    • View Profile
EthernetIPforCLXCom problem
« on: May 14, 2015, 01:30:58 PM »
Hello Archie,

I'm creating a full application which will be very large and a good test of your system. I love it. So much better than using Factorytalk.

I'm having problems with the forms creating new instances of Drivers. Here is my problem.

I create a form , create a Datasubscriber with no addresses, The form adds a EthernetIPforCLXCom1. I set the IP address to mine.

I save the form close it and open it again. and the form has added another driver called EthernetIPforCLXCom2 with the default IP.

I delete it but it keeps coming back when i close and open it.

Any ideas?

Also while i'm here. When i copy and paste a form it creates all sorts of errors about duplication. The copied form has a filename of "Copy of oldfom" but the name of the form is the same as the old form. Even changing the name does not help. So i'm stuck creating new form each one from scratch.

Any ideas on that too?

Thanks

Peter

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: EthernetIPforCLXCom problem
« Reply #1 on: May 14, 2015, 02:13:36 PM »
In the AdvancedHMIControls project under the \components folder, open the DataSubscriber.vb file

Go to line 46 in the BasicProperties region and delete this code:

                    '************************************************
                    '* If no comm component was found, then add one and
                    '* point the CommComponent property to it
                    '*********************************************
                    If m_CommComponent Is Nothing Then
                        m_CommComponent = New AdvancedHMIDrivers.EthernetIPforCLXCom
                        Me.Container.Add(DirectCast(m_CommComponent, System.ComponentModel.IComponent))
                    End If


Without this code you will have to make sure you add the driver first, otherwise it will give you an error.

pdonald

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: EthernetIPforCLXCom problem
« Reply #2 on: May 14, 2015, 04:02:39 PM »
Thanks Archie, I'll do that.

What about the other problem of copying/pasting forms?

Peter

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: EthernetIPforCLXCom problem
« Reply #3 on: May 14, 2015, 04:34:04 PM »
When copying and pasting a form it only changes the file name and not the form/class name, therefore creating a name conflict. To get around this right click the new form in Solution Explorer and select View Code. At the very top you will see the name of the class. Change that to a unique name.

pdonald

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: EthernetIPforCLXCom problem
« Reply #4 on: May 14, 2015, 05:04:05 PM »
Ahhh. I see.

Thanks for the speedy response.

Peter.