LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building an Exe.file for LabVIEW application

Hello,

I have developed a LabVIEW VI (version 6.1) for the automation process i.e. Motion control and Data acquisition for our instrument known as Long Trace Profilometer (it’s used to measure the profile of optical mirrors). I am building an Executable file for this application using the Build Application sub-menu, I specify the Destination directory and Support file directory, then add the Top most level VI and include three MS Excel files as support files. (The data acquired during the data acquisition process of the program are stored in the 3 Excel files, for further data manipulation and processing) In the VI developed these excel files are called as inputs, for profile calculation of the mirror, for this pur
pose the path to them are specified.

Now when I am developing the Exe.file for this application, everything works fine, except that when I run the application the path for the 3 excel files are still the same the one that I had specified in the VI.

How do I overcome this so that the Excel files are called from the data folder of the EXE application and not from the previous folder. Do I have to change there paths in the VI?

Thanks in advance.

Selva
0 Kudos
Message 1 of 3
(2,939 Views)
There's a couple of things that you need to do. One, when you create the installer, make sure that the path for the support files is what you expect. By default, the files are installed to the data subdirectory of the installation destination. Clcik on the Files button of the Installer tab to change where the support files are installed to. Second, in the VI, you should make sure you don't have a file constant that specifies where to find the support files. Use the function Current VI's Path to get path information to the VI. You then use one or two Strip Path functions to determine the path alone. The reason I say one or two Strip Path functions is that before you build the app, the Current VI;s Path function might return something like c:\folder
\something.vi and after the build it will return c:\folder\something.exe\something.vi. To make both the development and built application work, add a test to see if you're in the development or run-time system. To do this, use property node Application:Kind.
Message 2 of 3
(2,939 Views)
Hi Dennis,

I implemented your solution in 2 of my subvi's that call the main one and tested them they are working fine as individual VI and as exe files also. I need to apply the same concept for couple of other VI's before testing the whole application.Will get back to you, once Iam done.
Thanxs for your help.

Selva
0 Kudos
Message 3 of 3
(2,939 Views)