LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

return to main vi

I have a LabVIEW code with 2 sub VI's. I wanted the VI to return to the main front panel, while clicking an ENTER button in the sub vi front panel. But this couldn't be possible, without pressing the return to caller button. I am new to LabVIEW. Can any one help me.. Thanks in advance.

0 Kudos
Message 1 of 9
(2,957 Views)

@Vaava wrote:

I have a LabVIEW code with 2 sub VI's. I wanted the VI to return to the main front panel, while clicking an ENTER button in the sub vi front panel. But this couldn't be possible, without pressing the return to caller button. I am new to LabVIEW. Can any one help me.. Thanks in advance.


If I understand your question, you want to return from the Electron Voltage sub-VI after entering a value in "Enter Electron Voltage", but without having to push the Enter button.  Simple -- delete the Enter button and remove the While loop surrounding the rest of the code.

 

BS

0 Kudos
Message 2 of 9
(2,917 Views)

you are right.. but after entering the electron voltage and mass sweep values, it should automatically return to the main front panel 

0 Kudos
Message 3 of 9
(2,896 Views)

I cant open the VIs since i'm on LV2011 atm, but do you mean the values should return, or execution?

To return values, connect indicators to the connection panel, for execution it returns automatically when the sub-vi finishes.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 9
(2,873 Views)

At the main vi BD, right click on the subVI you want to appear->disappear and go to SubVI Node Setup. Select Show Front Panel when called and Close afterwards if originally closed.

 

[Unsolicited advice] In your mass range subVI, you might think about using the inRange function not just to tell the user when he has entered an invalid top or bottom number, but to coerce the number to a valid one (and maybe to pop up the warning, too). That is a much "friendlier" response and it has a bonus of seeming like the program is much "smarter"  (which seems like you are much smarter, too Smiley Wink ). [\Unsolicited advice]

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 5 of 9
(2,858 Views)

the sub vi has drop down menu (user can select from menu)  and user entry tabs. and the main vi has the final result. To be more clear..After the user enter the user-entry values and select the drop down menu, they should press some button in the front panel of the sub vi so that the control automatically go to the main front panel.. 

0 Kudos
Message 6 of 9
(2,857 Views)

thanks.. but if i do that and the sub vi closes immediately and the user cannot enter the input in run mode.. 

0 Kudos
Message 7 of 9
(2,849 Views)

@Vaava wrote:

thanks.. but if i do that and the sub vi closes immediately and the user cannot enter the input in run mode.. 


Who are you answering, and exactly what are "that" and the subVI you are referring to?

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 8 of 9
(2,835 Views)

I think you're trying to do too much with too little there. I've attached a VI (LV 2012) which I use for much the same thing. It does more than you are wanting in your question (particularly the intensity scale stuff), but if you push your way through it and make sure you understand everything in it (at least everything appropriate for your task), then you should be in good shape.

 

[Stupid Firefox Bug - #!*$&%#!] I had to upload it as a ".vix" file, which means nothing. Save the file and change the file extension back to ".vi" and you can use it in LV.

 

[Disclaimer] This might not be the most efficient way to "autoscale" a graph - or input a range of values to a control - nor might it exactly follow LabVIEW best practices, but it works adn appears to be bulletproof (for my application, anyway).

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 9 of 9
(2,824 Views)