LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Asychronously called VI does not work when compiled into EXE

Solved!
Go to solution

Hello all

 

I am having trouble with the code below:

 

Clipboard01.jpg

Clipboard02.jpg

 

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

0 Kudos
Message 1 of 6
(3,056 Views)
Solution
Accepted by topic author Radiator

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?

Regards
Freelance_LV
TestAutomation Consultant
Message 2 of 6
(3,055 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 6
(3,048 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 6
(3,043 Views)

Thanks for all the speedy responses!

 

Here is the solution:

 

Clipboard01.jpg

 

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

0 Kudos
Message 5 of 6
(3,035 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 6
(3,028 Views)