04-22-2018 01:31 AM
Hello! Has your problem been solved? I also want help
04-22-2018 06:14 PM
Simple method is you need to write separate wrapper in. C# and call them in. .net palate
04-22-2018 10:43 PM
thanks! Can you use labview to call it directly
04-24-2018 05:10 AM
Is this successful? I tried not
09-03-2018 03:50 PM
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
04-06-2022 10:44 AM
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
03-05-2025 02:36 AM
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?
08-06-2025 05:52 PM
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.
08-07-2025 05:43 AM
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.
08-07-2025 08:25 AM
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.