Author Topic: Selecting drivers / controls for project  (Read 1674 times)

mlefebvre64

  • Newbie
  • *
  • Posts: 14
    • View Profile
Selecting drivers / controls for project
« on: February 13, 2018, 11:49:06 AM »
Is there a way to add to an existing project only selected drivers / controls?
For example, I only need EthernetIpforSLCMicroComm, DigitalPanelMeter, and SquareIlluminatedButton. I would like to add these to an already existing VB project that does not reference any AHMI components.

The entire AHMI source will of course be included on the system upon deployment.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: Selecting drivers / controls for project
« Reply #1 on: February 13, 2018, 12:07:30 PM »
If you have an existing project, you can add that project to the AdvancedHMI solution then add references to the AdvancedHMIControls and AdvancedHMIDrivers projects. You can then add things from the Toolbox to your pre-existing project.

mlefebvre64

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Selecting drivers / controls for project
« Reply #2 on: February 13, 2018, 04:06:51 PM »
Very much appreciate the help.

I was able to Add my project to the AdvancedHMIv3 solution.
I added the EthernetIPforSLCMicroComm driver to my startup form.
Cleaned and Built the project - no errors.

The drivers show up in the toolbox.
When I go to Choose Items... I can see the list of AHMI controls, they are all checked. But, they aren't in the toolbox.
The references to add were the AdvancedHMIControls and AdvancedHMIDrivers Projects correct?
What can I do to get the controls into the toolbox?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: Selecting drivers / controls for project
« Reply #3 on: February 13, 2018, 04:39:23 PM »
You may also have to add references to

AdvancedHMIControls\Support\MfgControl.AdvancedHMI.Controls.dll
AdvancedHMIDrivers\Support\MfgControl.AdvancedHMI.Drivers.dll

mlefebvre64

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Selecting drivers / controls for project
« Reply #4 on: February 14, 2018, 08:41:18 AM »
Just to confirm:
Listed in my References for MyProject I added into the AdvancedHMIv3 solution.
AdvancedHMI.exe
AdvancedHMIDrivers.dll
MfgControl.AdvancedHMI.Control.dll
MfgControl.AdvancedHMI.Drivers.dll

Is this listing correct? Is the AdvancedHMI.exe correct or should that be a dll?
I tried buidling the AdvancedHMIv3 solution prior to added MyProject.
I also tried adding it before building AdvancedHMIv3.

Under the Solution Set Startup Projects, should this be set as a Single startup project or Multiple startup projects?

My next step may be to import MyProject classes and forms one at time into the AdvancedHMIv3 and see if I can get that work.

If I open the MainForm.vb in the AdvancedHMI project, the toolbox lists the AHMI controls.
They are just not available when I open a form inside MyProject.

Thanks again for your assistance.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: Selecting drivers / controls for project
« Reply #5 on: February 14, 2018, 08:47:54 AM »
These are the needed references:

AdvancedHMIDrivers  (project, not dll)
AdvancedHMIControls  (project, not dll)
MfgControl.AdvancedHMI.Control.dll
MfgControl.AdvancedHMI.Drivers.dll

You can check the references in the AdvancedHMI project to see how they are setup.

mlefebvre64

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Selecting drivers / controls for project
« Reply #6 on: February 14, 2018, 10:43:52 AM »
I was able to add my project and maintain all the controls in the toolbox.
I started with a fresh AdvancedHMIv3 solution.
Got everything working with this solution.
Added the references I needed for MyProject into AdvancedHMIv3 solution.
Added the classes, forms and resources from MyProject  into AdvancedHMIv3 solution.
Changed the startup form to the startup form in MyProject.
Added the driver to startup form -> recompiled.
All toolbox controls still available!

Thanks everyone for the help!

mlefebvre64

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Selecting drivers / controls for project
« Reply #7 on: February 14, 2018, 01:29:56 PM »
Well, not so fast.

I have added all my classes and forms to the AdvancedHMI project.
I add the EthernetIPforSLCMicroComm driver and as expected a control is added EthernetIPforSLCMicroComm1 to my form  and I configure the IP property to what I need. All good, compiles, no errors.

When I add the DigitalPanelMeter, another EthernetIPforSLCMicroComm control is added to my form.

This one is named "EthernetIPforSLCMicroComm" with a default IP that doesn't match my PLC IP address. And I can't change the IP address or delete the control unless I delete the DigitalPanelMeter and restart the solution.

Any thoughts as to why I can't add the DigitalPanelMeter without this extra EthernetIPforSLCMicroComm?


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: Selecting drivers / controls for project
« Reply #8 on: February 14, 2018, 01:34:00 PM »
There is a quirk with Visual Studio that randomly happens where it does not recognize the driver that is already on the form, so it adds what it thinks is the first driver. Typically closing the form, exiting VS and re-opening makes this problem go away.

On the DigitalPanelMeter that added the additional driver, you will need to set the ComComponent property to point to the correct driver.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: Selecting drivers / controls for project
« Reply #9 on: February 14, 2018, 01:37:34 PM »
I should ask... what version are you using because the driver names had 2 m's many versions ago?

mlefebvre64

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Selecting drivers / controls for project
« Reply #10 on: February 14, 2018, 02:07:21 PM »
Version 3.2.1.0.
I was able to get this version connected quickly and talking to the PLC.
I will try a more recent version working now that I have some of the kinks worked out.

Your above suggestion worked, thank you!
Is there a way to remove the extra driver that remained?

I am trying version 3.8.4.
The EthernetIPforPLCSLCCom1 driver is asking for a Port Number that the 3.2 version didn't require. Is this the correct driver to talk to an Allen-Bradley Micrologix 1400? I tried both 44818 and 2222 with no luck.

mlefebvre64

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Selecting drivers / controls for project
« Reply #11 on: February 14, 2018, 02:23:53 PM »
Ok, following pal's suggestion I was able to get 3.99 to work. I will proceed with this version and hopefully stop spamming the thread. Thanks, but I'm sure you haven't heard the last of me.

If it helps , I am using AHMI v 3.99r with 2010 sp1 . As Godra said ,  non - appearing drivers was a problem suspected to be in studio . Putting any driver from the toolbox onto your form and then building has always populated the rest of the drivers into the toolbox for me . You can then insert the driver you want and delete the 1st .
Archie , for me I still have not figured out how to deploy a small enough version of VB offline . The target machine has no internet connection , nor will it for security reasons .
Paul