LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stopping a subpanel vi

Solved!
Go to solution

I have a program consisting of a main vi that calls one of three different subpanels depending on an entered number. I can exit the subpanel just fine and proceed to use a different one with a different number, but I also want to stop the whole program with one button. I can use a global variable with a while loop, but I have an event structure with a timout of 10 mimutes that I can't change. How do I trigger the event structure from the top level vi?

 

I have attached a snippet (I hope!) that shows what I want to do. I can't post the real code. The code as written stops, waiting on input from the "exit" button. I want to be able to use the "stop" button in the while loop to trigger the event structure. I can't get a global to do this.

 

Tay

0 Kudos
Message 1 of 5
(4,000 Views)

Idea only.

 

Stop.jpg

---

While evaluating my code please have in mind that I am a LV novice. Therefore sometimes my code might violate some coding rules that I have to learn about myself. But how else could I do that... 🙂

Chart zoom with "Mouse Over" effect
0 Kudos
Message 2 of 5
(3,991 Views)
Solution
Accepted by topic author slipstick

Giedrius.S wrote:

Idea only.

 

Stop.jpg


 

Psssttt...

 

You may want to pull that image down before Ed Dickens (Author of "Using teh Stop Function to stop your application in LabVIEW is a lot like using a tree to stop your car....") sees it.

 

Re: how to stop...

 

I suggset youread Ton's Nugget on Dynamic Event registration. Dynamic Event Registration lets you st-up an event in one VI that get triggered by a control in anothe VI. It take a little learning but once you get used to it, you'll like it.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 5
(3,983 Views)

This is how I do it: I use button labelled stop in the VI used in the subpanel (your exit case when the value change) and in the main application I call the following code to stop the subpanel VI.

 

Ben

 

stop sub-panel VI.png

Message 4 of 5
(3,956 Views)

This would work too. Thanks for the input!

 

Tay

0 Kudos
Message 5 of 5
(3,940 Views)