ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

取消
显示结果 
搜索替代 
您的意思是: 

Create exe with some vi files

已解决!
转到解答

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.

 

 

下载全部
0 项奖励
1 条消息(共 16 条)
4,930 次查看

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 2022 SP1 installed
0 项奖励
2 条消息(共 16 条)
4,909 次查看

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. 

下载全部
0 项奖励
3 条消息(共 16 条)
4,899 次查看

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 项奖励
4 条消息(共 16 条)
4,893 次查看
解答
已被主题作者 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.



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 项奖励
5 条消息(共 16 条)
4,875 次查看

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 2022 SP1 installed
0 项奖励
6 条消息(共 16 条)
4,869 次查看

Thank you very much!!!!

I've got it!

0 项奖励
7 条消息(共 16 条)
4,859 次查看

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 项奖励
8 条消息(共 16 条)
4,787 次查看
0 项奖励
9 条消息(共 16 条)
4,786 次查看

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 项奖励
10 条消息(共 16 条)
4,757 次查看