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 21
(2,806 Views)

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

0 Kudos
Message 12 of 21
(2,803 Views)

thanks! Can you use labview to call it directly

0 Kudos
Message 13 of 21
(2,794 Views)

Is this successful? I tried not

0 Kudos
Message 14 of 21
(2,786 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 21
(2,661 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 21
(1,817 Views)

hello sir

I need help solving this problem or finding any way to display the Cognex image on LabVIEW. I used .NET and could access the Cognex In-Sight Control .DLL, but how can I use it to display the image from Cognex?

0 Kudos
Message 17 of 21
(499 Views)

After some extensive sessions with ChatGPT, I was able to open a Cognex vpp project and get basic result status using the Coins example project in VisionPro QuickBuild v9.23 and LabVIEW 2024 64-bit. But I have yet to figure out how to navigate multiple images or how to get results from the "posted items" created at the end of the Coins tutorial. Please see the attached labview snippet. I'm hoping someone can springboard off of this example and get to the next level of functionality.

 

Note: I had to copy the Cognex dlls into a folder at the same level as my LabVIEW project to get this to work and not get the 1172 error.

0 Kudos
Message 18 of 21
(119 Views)

Hello Zynali,

 

Sorry for jumping in.

 

I wanted to ask what problem you are trying to solve with Cognex, and whether it might be addressed using our LabVIEW-native toolkits (DeepLTK - Deep Lerning Toolkit for LabVIEW).

 

We have had a few customers move from Cognex to DeepLTK due to pricing concerns, simplicity and better performance (speed and accuracy) achieved with our toolkit. The toolkit supports classification, detection (YOLO), and anomaly detection - all inside LabVIEW, with no external coding.

 

Thought it might be worth considering an easier and more flexible option.

 

Let me know if we can help map it to your use case.

Making LabVIEW Smrter and Faaster
0 Kudos
Message 19 of 21
(107 Views)

Hi ngene,

 

Thank you for your interest. My task is a proof of concept around using Cognex job scripts called from LabVIEW to improve performance and throughput compared to NI Vision. Cognex has much faster processing times than NI Vision and there is no roadmap that I am aware of for improving NI Vision. So my thought is that if I can offload the image processing to Cognex jobs and then return the results and processed image to LabVIEW then continue to use LabVIEW for test system control and sequencing. So for the moment, I'm just trying to figure out the Cognex VisionPro .NET interface and return results and a processed image. If that is successful, I'll go on to benchmark the performance against our current solution.

0 Kudos
Message 20 of 21
(100 Views)