LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

run programatically w/ stop option

I have created a vi that runs programatically, but I want it to be able to stop in the middle of running the program if the stop button is pushed.

I put the vi in a while loop and want the condition to be if stop is false. I tried to connect a local variable to the condition, among other things, but can not figure out what I need to connect to the condition if I cannot directly connect the stop button to it. Any suggestions?

Ellie
0 Kudos
Message 1 of 6
(3,317 Views)
What about a local of the stop button ?

The problem is that the mechanical action can not be latched anymore.
but outside the while (after the while I mean)
you can reset this by writing another local var of the stop button
greetings from the Netherlands
0 Kudos
Message 2 of 6
(3,317 Views)
You want to be able to stop the vi that you start programatically with a button on the front panel of that vi? Or another vi?

If its from another vi then you should probably use a global variable. You need to connect the stop button to the global variable. Then in the sub vi change the global to read and use it to trigger the subvi to stop.

I hope that this helps you. If this is not what you are trying to do, or you need an example, please let us know. We well do our best to help you out.

Brian
0 Kudos
Message 3 of 6
(3,317 Views)
I want to stop the vi that I start programatically with a button on the front panel of that vi. I have attached the program this time to clarify the question.
0 Kudos
Message 5 of 6
(3,317 Views)
I can help you out with this, but I think its important for me to know what exactly the finished product is supposed to do. There were several problems with the vi that you attached that I'd like to discuss as well. Let me know here, or email at: bvibert@bristolbabcock.com

Brian
0 Kudos
Message 6 of 6
(3,317 Views)
You can run and stop VIs programmatically using invoke nodes. Connect a reference to the VI that you want to control and choose the method "Abort VI" or "Run VI". A VI can even abort itself using this method.

Rob
0 Kudos
Message 4 of 6
(3,317 Views)