Author Topic: Create a custom component with the AdvancedHMI controls and drivers  (Read 9515 times)

yubish

  • Newbie
  • *
  • Posts: 11
    • View Profile
Hi, i'm a newbie and i'm trying to become more familiar with VB.NET
My question is : It is possible to create a component that includes AdvancedHMI controls and drivers and use it after in the project ?
For example, in my situation, i want to create a component that includes 2 Datasubscribers, the Ethernet/IP driver component and a digital panel meter.

Thank you in advance

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #1 on: April 12, 2015, 09:55:45 AM »
I'm not sure if I am fully understand what you mean.

The DigitalPanelMeter, Datasubscriber, and Ethernet/IP are all components that you add to a form.

yubish

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #2 on: April 12, 2015, 11:57:55 AM »
I mean by component a control. What i want actually is to create my own component (control) using AdvancedHMI controls and drivers,
 to mix a number of components (controls and drivers) in one component (one control) and the possibility for the result component (control) to inherit properties from his components (AdvancedHMI controls and drivers).

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #3 on: April 12, 2015, 02:37:43 PM »
What think what you are looking for is a UserControl.

- Right click the AdvancedHMI project in the Solution Explorer
- Add->User Control
- Add the controls you want to the UserControl
- You can then add many copies of the UserControl to your MainForm

yubish

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #4 on: April 13, 2015, 10:01:45 AM »
Thanks, It works well with the AdvancedHMI controls but i still have a problem, especially, when i add the component EthernetIPforCLXcom driver, i have a message error that indicates "incomplete solution".
In my usercontrol, i need 2 Datasubscribers and the EthernetIPforCLXcom component for the datasbscribers.  All the other drivers work when i add them in my usercontrol, the message error appears only when i add the EthernetIPforCLXcom driver.
« Last Edit: April 13, 2015, 10:10:52 AM by yubish »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #5 on: April 13, 2015, 10:16:26 AM »
The "Incomplete Solution" usually means it cannot find all of the parts of the AdvancedHMI solution. Such as the drivers being separated from the solution.

yubish

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #6 on: April 13, 2015, 10:54:09 AM »
Thank you Archie.
But, what can i do in this situation to resolve this problem ?
You will find attached the picture of the message error

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #7 on: April 13, 2015, 10:58:15 AM »
Can you post a screen shot of your Solution Explorer and a screen shot of \AdvancedHMI\bin\Debug directory.

I never tried a driver on a UserControl. I will see if I can test it later this evening.

yubish

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #8 on: April 13, 2015, 11:23:26 AM »
here is it

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #9 on: April 13, 2015, 11:34:13 AM »
Where do you have your UserControl?

yubish

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #10 on: April 13, 2015, 11:57:19 AM »
After it didn't work in The AdvancedHMI project, I moved it to the AdvancedHMI Controls project.

The problem is that when we put AdvancedHMI controls in a UserControl, we need a driver component included in the UserControl to set it in the properties of each AdvancedHMI control for the communication with the PLC, and the problem 'incomplete solution' appears only with the EthernetIP driver

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #11 on: April 13, 2015, 12:11:31 PM »
I will have to try this out later this afternoon to figure what it doesn't like.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #12 on: April 13, 2015, 10:13:08 PM »
I had to make a fix to the program to make it work. This will be part of the next release that will be available within the next 2 days.

yubish

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #13 on: April 14, 2015, 05:20:22 AM »
Thank you a lot Archie !

yubish

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Create a custom component with the AdvancedHMI controls and drivers
« Reply #14 on: April 17, 2015, 03:54:13 PM »
Hi again Archie ! We're always waiting for the next release, i hope it's going good.
Thank you a lot for your efforts, it's a great work and good luck.