LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i start a vi from a loading vi?

I have two vi, one is a loading vi, another is main vi.

 

they has below directory structure:

 

G:\LV_Source\main_screenflash.vi

G:\LV_Source\list\main_About.vi

 

In main_screenflash.vi, i create a path to lunch main_about.vi and main_screenflash.vi should

 

exit. It can work. But after create a exe file, the main_about.vi can not be displayed.  A screen flash

 

quickly, then dispear. It seem that it is showed, but i don't know why it dispear. After tested many times,

 

but cannot find root cause yet, please help me to fix it.

 

attach my vi. it is very simple. please correct my error. thanks. 🙂

 

 

 

Download All
0 Kudos
Message 1 of 7
(3,201 Views)

you must be getting wrong path when you create exe......use an indicator to see the path of the main_about.vi in the exe....

 

 

one sub VI is missing..so i can not run your program and seee........

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
0 Kudos
Message 2 of 7
(3,196 Views)

Add a strip path in there.  when running as an exe the current path returns the exe file.  for example

devlopment /labview/myvis/main.vi

exe             /labview/myvis/main.exe/main.vi

 

You can use an app property node app.kind to determin if it is running in the devlopmet enviorment or as an exe to do this automatically.

 

Greg

Gregory Osenbach
0 Kudos
Message 3 of 7
(3,184 Views)

hi, Reddy

 

thank you.

 

I had tried to display path.  Only a .exe directory is added. But i don't know whether this can lead to my problem.

 

For main_about.vi, its relative path will be kept after creatng exe,right? I mean if relatve path is kept, no error should

 

be existed, But i am not sure about it.

 

attached missing vi and jpg.

 

thanks again. 

 

wish you can help again.

 

 

Download All
0 Kudos
Message 4 of 7
(3,172 Views)

Hi, gosenbach

 

thank you firstly.

 

But i don't understand how this extra exe path can lead to my problem. 😞

 

my first vi can be started, its path: labview/myvis/main.exe/main_screenflash.vi

 

for second vi, its pash should be:labview/myvis/main.exe/list/main_about.vi.

 

it right? I think it can be found too.

 

I don't know relative path whether will be kept after creating exe file.

 

thanks. Please continue to help me.

 

br

 

 

0 Kudos
Message 5 of 7
(3,171 Views)

hi,

 

every time, I can see my main_about is showen, but very quickly, it dispear. So

 

i think it is not  a problem of path. But i still don't find root cause.

 

😞

 

thanks.

0 Kudos
Message 6 of 7
(3,163 Views)

It is defenetly the problem with the path

 

Now consdier these paths

G:\LV_Source\main_screenflash.vi

G:\LV_Source\list\main_About.vi

 

When run in the development mode evrything is fine....

 

But when the installer gets created the path will become as ......\About.vi\application.exe or something like that...

 

So what you do is rip the path twice if the the code is running in the exe mode....

 

 

The below snippet shoud solve the problem

 

 

 

 

 

 

Regards
Guru (CLA)
0 Kudos
Message 7 of 7
(3,161 Views)