LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How To Open a subVi by pressing an "open file button",

I got this Readdatasubvi I want to run when I press a 'Open file' button in the main vi, Then  The sub vi runs and a open file menu opens to choose a file to read from and plot out to a graph. It is working but how can I see the readDataSub VI as an application wich are running parallel with the main VI. It only runs in the background, and I cant see the plottet data Why????? The sub vi has a graph for the plotted data! but it never shows up!
 
an example is attached..
I'll appreciate any suggestions .
 
The stars are ofcourse waiting!
 
Regards
Zamzam 
HFZ
0 Kudos
Message 1 of 7
(4,031 Views)
Hi,

this is because the open/create..vi calls the "file dialog.vi" inside.
The file dialog.vi opens its frontpanel automatically.

If you want your vi to show its frontpanel do the following:
In Labview open your ReadDataSub.vi.
-> file -> vi properties
category: window appearance -> custom -> customize
check "show frontpanel when called"
check "close afterwars if originally closed" if you want to close the frontpanel after execution.

Regards,

Rainer
Message 2 of 7
(4,027 Views)
Thanks man....
 that was a release...
 
Zamzam
HFZ
0 Kudos
Message 3 of 7
(4,017 Views)
There is still another way to do this from software.

1. place a property node on the blockdiagramm the vi you want to open. (application control-> property node)

2. right click on the property node then

3. select class -> VI Server -> VI

4. change properties to write

5. select "Front panel Window -> open"

with this property you can handle if front panel opens or not.

Rainer
Message 4 of 7
(4,006 Views)
Hi Rainer
Thaks for the Hint,  But I figured it out By playing with the application  controls and so. But i wonder if there are in the property node, function that can
Close the Sub vi,, with out closing the hole Main VI. With it.
Coz if I press the Openfile button to open the Sub VI, and don't select a file to read from, and press the cancel button of the appeared "open file" window, My main VI stops, how can I avoid that. I want example make an cancel button in the sub VI!!
 
Is it possible.??
 
Zamzam
 
HFZ
0 Kudos
Message 5 of 7
(3,986 Views)
Hi,

i tweaked you example.
I guess that's what you're looking for.

Rainer

P.S.: I unchecked the "open frontpanel" in the vi properties. i open (close) the frontpanel using property nodes now.
Download All
Message 6 of 7
(3,985 Views)
A lot of thanks to you.
 
Exactly what i was searching!!
 
ZamzamSmiley Wink
HFZ
0 Kudos
Message 7 of 7
(3,972 Views)