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