12-31-2013 10:28 AM - edited 12-31-2013 10:30 AM
I have a application that is being designed for a continuous integration server. This application uses the VI Analyzer API (Labview 2009 at the moment) to run a set of tests on a folder of VIs. The issue is that when the program is run as VI everything is happy, the folder is added using the "VIAn Add Item.vi" and the task runs on the four VI's in the folder. But when the VI is built and ran as an exe, "VIAn Add Item.vi" appears to add the folder but the no vi's are analyzed and if a specific VI is given then error 53 is thrown by "NI_FileType.lvlib:Get File Type.vi". Is this simply a case of not being able to use the VI Analyzer API in a built application that is being run as a exe? I attached the front panel of the built app after it has been run and the back panel of the source code in question; there is more to it the rest of it is just for determining the paths to scan.
Solved! Go to Solution.
12-31-2013 04:39 PM
The VI Analyzer API is not supported in a built EXE.
12-31-2013 04:57 PM - edited 12-31-2013 04:58 PM
Thanks for the reply!
Is there any way of doing something like this without the need to install and run the full PDE on the server in order to run the program? Would it be possible to call a normal, non-built, vi (either by a static reference or some other method) from within a built EXE, there by not requiring the dev environment to started?
01-02-2014 11:33 AM
Most VI Analyzer tests use some VI Scripting functionality to inspect VIs. VI Scripting is not supported in the LabVIEW Run-Time Engine, and thus, the VI Analyzer really isn't either.
A discussion on these topics recently took place on LAVA, here's the link:
http://lavag.org/topic/17847-using-scripting-to-inspect-code-from-a-built-exe/
Jack's suggestion in this thread seems to be the most viable for your use case...but at the end of the day, you will need the LabVIEW editor running *somewhere* in order to actually do the VI inspection.
01-03-2014 02:35 PM
It was decided the installing the editor environment on the server would not be a big deal, so I was able to get it working by writing a batch file that calls labview, passes the vi to it to be opened, and passes any user-defined augments to the vi. In the VI, I set the "run-on-call" option to true, and added a "quit Labview" block at the end. This way it "acts" like a built program, just with a long startup time.
I know its not ideal or "correct" (if there is such thing when using a product in a way that it not indented) but it only needs to be on the one server so in this case it is fine.
In the future this functionality (using the VI Analyzer API from within a built application) might be a nice thing to add to software validation tool set that is already in place, if its possible. (It may not be)
Anyway just my 2 cents on the subject, thanks for the help and quick responses.
- Christoher