09-21-2012 06:02 AM
Hello all
I am having trouble with the code below:
This works fine from the development environment (Labview 2012) but the Acquire VI is not called from the EXE. I do not receive any error messages, I have read the threads concerning the Current VI path (http://digital.ni.com/public.nsf/allkb/FD7DE8BC8FFC256C862565F4006BE363).
Any help would be appreciated.
Ray
Solved! Go to Solution.
09-21-2012 06:14 AM
Two questions:
1. Did you verify the path coming into the Open VI Reference function?
2. Did you include 'Acqurie.vi' in the 'always included' of the Build?
09-21-2012 06:52 AM - edited 09-21-2012 06:53 AM
Also, how is the EXE being built. I think it was in 2009, they changed the EXE to be more of a zip file format. Which means the file hierarchy is still there. You might simply be pointing to the wrong location due to your case structure. There is an option in the build specification to keep the 8.X format.
09-21-2012 06:59 AM
Ray,
besides the hint crossrulz already stated (setup of files in EXE itself), there is another option:
I assume that your subVI has its own call hierarchy. You have to know that the RTE is not aware of vi.lib, instr.lib and user.lib as search directory. So depending components in those folders are likely not found.
Receiving no error seems very odd... i'd rather expect either
"File not found" (see crossrulz explanation)
or
"VI not executable" (see my explanation)
as error message if error handling is done properly in the application.
Norbert
09-21-2012 07:26 AM
Thanks for all the speedy responses!
Here is the solution:
Freelance_LV - I followed your suggestions, I did not have the VI set to always be included and so this might now be why the above code works.
Crossrulz - I reverted to message box pop ups to view the path in the different environments and I saw the path structures that you refer to, thanks.
Norbert - I had assumed that the path was correct as I was no longer receiving errors in either environment. It does look like my VI was not being found (maybe because it was not in the "always include" box) so I will double check my error handling.
Thanks to you all
Ray
09-21-2012 07:57 AM
Ray et all,
the "always include" option is the most simple solution since you make sure by it, that the subVI and all its dependencies are compiled into the EXE itself. So using the 2009+ EXE layout, you can navigate within your EXE just like as if you are using a zip-file. If relative paths are correct in developement environment, they are likely to be correct within the EXE.
On the other hand, you have to recompile the EXE each time you make changes to those "externally" called VIs. This is not suitable for certain application areas, so they require the subVI to be placed outside the EXE. We call this "plug-in architecture".
Plug-ins have to be prepared for deployment, simpel copy&paste of the top-level VI will not work out for most plug-ins....
I think there are some well-written tutorials on this topic, foremost if plug-ins are LVOOP based (if you are interested).
Norbert