LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create exe with some vi files

Solved!
Go to solution

Hello,

 

I am using LabVIEW 2010

 

I am trying to build a "Main.vi" into an exe, in which this Main.vi needs to dynamically call two vi "1.vi" and "2.vi". I have put  into "always included" before building the exe. But after creating exe "1.vi" and "2.vi" don't run.

 

 

Download All
0 Kudos
Message 1 of 16
(3,338 Views)

Hi Darkhan

 

If you are using dynamic calling, you need to ensure you get the correct path:

your path is probably broken/incorrect in the EXE.

use the "Application Path" to specify the path to the VI in your project in the development environment, then it sould work in the runtime environment!

(Path constant found on File I/O > File Constants Pallette)

 

Should work for all LabVIEW from 2009 onwards if I remember correctly.

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 2 of 16
(3,317 Views)

Thank you for the answer and I apologize for my English. My LabVIEW program  work correctly. I have 2 vi: Monitoring.vi and Monitoring_of air.vi, when in labview I click button of monitoring will open Monitoring_of air.vi. But when I have created exe file only open start vi. Monitoring_of air.vi is ignored. 

Download All
0 Kudos
Message 3 of 16
(3,307 Views)

Your paths are absolute and point to a static location outside the EXE.

 

Inside the EXE, you should navigate using "Current VI Path" and strip the VI name, then add the sub-vi name (and path, depending on the EXE setup).

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 16
(3,301 Views)
Solution
Accepted by topic author Darkhan

Just to show what Norbert is saying.  You should get in the habit of using relative paths.  They will save you a lot of headaches down the road, especially if you are dynamically calling VIs inside of EXEs.


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
0 Kudos
Message 5 of 16
(3,283 Views)

Hi Darhan,

 

If you build up from the Applcation path you should be fine.. I rather suspect that the application path is "D:\monitoring2" in this case anyway.

 

(Look at the detail help to see how the application path is working.)

 

If you can get it working with the application path as a relative path in the development environment, your runtime should not crash!

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 6 of 16
(3,277 Views)

Thank you very much!!!!

I've got it!

0 Kudos
Message 7 of 16
(3,267 Views)

Hi! 

I have created exe file, but open button of my report (Word) don't work. I used "Current VI Path". In labview this button is working.
Thank you!

0 Kudos
Message 8 of 16
(3,195 Views)
0 Kudos
Message 9 of 16
(3,194 Views)

If moving outside of the EXE, you should use "Application Directory" instead of Current VI Path. This ensures that you leave the EXE without the need to track "Strip Path" on your own.

 

Norbert

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