Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Interface cognex developed application to Labview

Hello! Has your problem been solved? I also want help

0 Kudos
Message 11 of 16
(1,962 Views)

Simple method is you need to write separate wrapper in. C# and call them in. .net palate 

0 Kudos
Message 12 of 16
(1,959 Views)

thanks! Can you use labview to call it directly

0 Kudos
Message 13 of 16
(1,950 Views)

Is this successful? I tried not

0 Kudos
Message 14 of 16
(1,942 Views)

Hello everyone, I´ve solved this issue!

 

I have also been strogling with this issue this past month, by using the sample code posted here I was able to run Cognex vpp files throught a .NET call, but it was unstable and had an intermitent behaviour - Sometimes this method crashes so hard that I had to to kill the LabVIEW Process to exit the code.

 

The code provided is correct but need some special considerations:

 

1) The path for vpp file should be written in "windows style" Eg: C:\Project\Test.vpp;

 

2) The .NET framework installed should be 4.0 or higher;

 

3) The Cognex QuickBuild framework was designed to be used with 64 bit environment, so you must use LabView 64 bit (we have made tests in LabView 2015/2016/2017 and 2018 and the stable result came trough only in 64bit mode for all versions.

 

4) At the VI that calls the "LoadObjetcFromFile" method you should set a very specific settings - The VI's Preferred Execution System is set as "same as caller" by default, you must change it to "user interface" (you can find this option under Vi Properties > Execution).


I hope this helps somewhat. 

William Heinrich

Message 15 of 16
(1,817 Views)

Hi William, 

I am also looking for a similar solution. Is it possible to share some Cognex communication part of your code. I want to run a Cognex application using LabVIEW. 

Thanks

Sayak

 

0 Kudos
Message 16 of 16
(973 Views)