Author Topic: HMI using C# and EhternetIPforCLXcom  (Read 5800 times)

Richard Waterson

  • Newbie
  • *
  • Posts: 9
    • View Profile
HMI using C# and EhternetIPforCLXcom
« on: May 22, 2015, 10:48:50 PM »
I wrote a HMi in C# using  an older version of youre advanced HMI drivers. It worked just fine until I updated to the latest driver. Now When I start up the program I get and error that says "Incomplete Solution"  It seems to be hanging up on the "EthernetIPforCLXcom.IPaddress". By the way in the advancedHMI driver version I was using "EthernetIPforCLXcomm" has 2 M's.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: HMI using C# and EhternetIPforCLXcom
« Reply #1 on: May 23, 2015, 09:38:28 AM »
The new version of the drivers can no longer be separated from the AdvancedHMI solution. You can use C# by adding a C# project to the AdvancedHMI Solution, then adding the same references that are in the AdvancedHMI project.

Richard Waterson

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: HMI using C# and EhternetIPforCLXcom
« Reply #2 on: May 24, 2015, 12:44:44 PM »
Does that mean I have to build a project in VB and then add a C# project to it?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: HMI using C# and EhternetIPforCLXcom
« Reply #3 on: May 24, 2015, 12:55:26 PM »
You start with the AdvancedHMI solution
Right Click the Advanced Solution in Solution Explorer
Add New Project->C#
Add these 4 references:

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

You can now work with the C# project and use the controls and drivers

Richard Waterson

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: HMI using C# and EhternetIPforCLXcom
« Reply #4 on: May 24, 2015, 02:50:16 PM »
I get it now.

Thanks

By the way the project I am working on  takes the depth data coming from a xbox1 kinect V2 sensor and sends it to a CLX 5000 array so the PLC can look for defects in sheets that move through the cameras view. I am using your drivers to to fill up a 512 int array in the CLX5000 every 100MS. I had to break it up into 4 writes but it works good.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: HMI using C# and EhternetIPforCLXcom
« Reply #5 on: May 25, 2015, 04:32:43 PM »
That sounds like an interesting application. I like that you come up with the idea of using a Kinect sensor. I never thought of using one for an inspection system.

In version 3.98j, there has been a number of changes to the CLX driver to make things faster. One of them is a larger packet size. Maybe you will be able to write all of your elements in 2 or 3 writes instead of 4.

DavidR

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: HMI using C# and EhternetIPforCLXcom
« Reply #6 on: July 22, 2015, 02:46:48 AM »
You start with the AdvancedHMI solution
Right Click the Advanced Solution in Solution Explorer
Add New Project->C#
Add these 4 references:

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

You can now work with the C# project and use the controls and drivers

I have just upgraded from version 3.6.1 to the latest version, have followed the instructions above but still get the "incomplete solution" message when I move my project to another computer.
It appears to work on my development PC but not when I move it to another computer.
I only use the EthernetIPforCLXCom and EthernetIPforPLCSLCMicroCom drivers to read data into a c# program, I don't use any HMI controls.
Any help would be much appreciated.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: HMI using C# and EhternetIPforCLXcom
« Reply #7 on: July 22, 2015, 08:05:01 AM »
With the latest version, you should be able to just Right click the Solution, Add New Project, and select C# Windows Form project type. In my tests, this configured everything automatically.

What files did you copy to the machine you are running the application on? I always recommend copying the complete solution and creating a shortcut to the EXE file. The guarantees you get everything to avoid the incomplete solution and also guarantees compliance with the licensing.

DavidR

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: HMI using C# and EhternetIPforCLXcom
« Reply #8 on: July 23, 2015, 01:26:47 AM »
I have tried copying the complete solution to the other computer then running the exe for the C# program but I still get the incomplete solution error.
The main difference to your instructions is that I added my existing c# project rather than creating a new c# project and I made my existing project the start up program.  It is difficult for me to test/debug as my development PC is on our business network and the PLC's I read from are on a physically separate network. It has been working fine with the older version drivers but I have been getting a "Read Failed - Result=-20. No Data Returned" error intermittently with the EthernetIPforPLCSLCMicroCom driver which prompted me to try upgrading the drivers.

DavidR

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: HMI using C# and EhternetIPforCLXcom
« Reply #9 on: July 23, 2015, 03:53:27 AM »
I have got it working by creating a new project then copying all my code into that new project as well as copying the whole solution to the other PC (80 Mb instead of 2 Mb, strange way to distribute a program).  Now I will have to wait and see if I still get the intermittent "Read Failed -Result=-20. No Data Returned" error.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: HMI using C# and EhternetIPforCLXcom
« Reply #10 on: July 23, 2015, 07:36:16 AM »
If you added an existing C# project to the solution, then it most likely was missing some of the references that caused the error.

Copying the complete solution does add a lot more size to the deployment, but it will make the next person that comes behind you much happier when they have the full solution and will be able to make changes. Or if your computer crashes then you will have a backup of the complete solution on the target PC.

CesarKM

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: HMI using C# and EhternetIPforCLXcom
« Reply #11 on: August 20, 2015, 10:58:45 AM »
You start with the AdvancedHMI solution
Right Click the Advanced Solution in Solution Explorer
Add New Project->C#
Add these 4 references:

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

You can now work with the C# project and use the controls and drivers

Hi, i got the same trouble.
I did this steps but didnt worked.

I found the reason here : Go for properties of my project and was Target for .NET Framework 4 Client Profile. I just put to .Net Framework 4 and then work normal.