LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Stop Subvi as well as called vi by pressing the stop button in the subvi

Hello Everyone i am beginer in Labview , i have developed one application in that i am facing one problem pls help me in sorting out . The problem is "How to Stop whole labview by pressing the stop button in the Sub VI "

 

Thanks & Regards

  Nandisha
 

0 Kudos
Message 1 of 19
(3,810 Views)

Hi Nandhisha,

 

There are different ways to do this. I am explaining two of them here,

 

1. Pass reference of boolean button which controls main vi's while loop in to the sub vi. When sub vi got stopped write a true value to the value property of the refnum that is being passed in. This will stop the main vi while the sub vi is being stopped.

 

2. Define a boolean global variable which can be written in the sub vi and can be read from main vi. So here also the main vi will be stopped when the sub vi is being stopped.

 

You can choose any one which is convenient for you.

 

MRK (CLAD)

0 Kudos
Message 2 of 19
(3,805 Views)
Thanks Mr.MRK pls kindly  can u attach few examples, working environment  labview 7.1
0 Kudos
Message 3 of 19
(3,800 Views)
Here are the VIs
0 Kudos
Message 4 of 19
(3,795 Views)

 


"How to Stop whole labview by pressing the stop button in the Sub VI "

 Quit LabVIEW.JPG

In Application pallete>>Exit Labview. Give true to exit LabVIEW to stop whole LabVIEW Smiley WinkSmiley Very Happy

Message Edited by Baji on 05-29-2009 12:10 PM
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 5 of 19
(3,791 Views)

Thanku Mr.Balaji but my requirement is something like these in calling vi i have not used while loop and when i press the stop button in the subvi's it should stop whole in the sense all the labview i,e. calling and called VI's

 

Thanks & Regards

  Nandisha 

0 Kudos
Message 6 of 19
(3,781 Views)
Thanku Mr.MRK but my requirement is something like these in calling vi i have not used while loop and when i press the stop button in the subvi's it should stop whole in the sense all the labview i,e. calling and called VI's. Pls kindly attach some samples working envirnoment LV 7.1

 

Thanks & Regards

  Nandisha 

0 Kudos
Message 7 of 19
(3,780 Views)

If it is the case and if my understanding is correct the scenario can be explained below,

 

The calling vi will automatically get stopped and come out of labview memory if it is not having while loop in it. And use the exit labview function in the sub vi to quit labview or otherwise pressing stop button itself will stop the sub vi..

0 Kudos
Message 8 of 19
(3,778 Views)
How to attch my rar file so that i ll send my code to u
0 Kudos
Message 9 of 19
(3,764 Views)
Hello MRK i ll attach my code u just analyse and hope so u ll come to know where i am facing problem. Before that some conditions u need to follow

 

1.In C drive program files u create a text document by name license record with out ny data in it.

2.Try to execute in the order which i mentioned below

   a.1st run the imp vi then automatically key window vi is going to come enter any key but it ll show some mess after that u close the labview then go to license record file  manipulate data in the format

bitsysmac address29/05/2009....installed29/05/2010123

3.Now try to run imp vi so that it ll not craete new file but it ll go directly to key window vi u enter the key as 123 so that it ll allow u to w3.vi

My problem is when i stop in the key window vi are in w3 vi window the whole vi should stop not quit .
0 Kudos
Message 10 of 19
(3,759 Views)