From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop a While Loop From a Menu Selection

Good Morning!
I have an application using menus as the primary user interface tool.
I want to stop a while loop, but have only been able to do so with a push

button.
Any suggestions or solutions are much appreciated.
Thanks in advance
Dave
0 Kudos
Message 1 of 4
(2,658 Views)
In article <38bd2158@newsgroups.ni.com>,
Dave Gearhart wrote:
>
>Good Morning!
>I have an application using menus as the primary user interface tool.
>I want to stop a while loop, but have only been able to do so with a push
>button.

In the lower right hand corner, there is a green and yellow icon. What
you need to do is wire a boolean to that. As long as whatever your
condition is is true, the loop will continue. When your boolean turns
false, it will stop the loop.

Harry

--
0 Kudos
Message 2 of 4
(2,658 Views)
Hi,
I use menu options to stop while loop in some of my program.

What I do is to check inside the loop if the menu selection is an empty
string, if it is I go on with the loop if it is not empty I compare with
the option of the menu and according of what it is I exit the loop or not.

Bye!
sacate@jazzfutboleros.com



Dave Gearhart escribió en el mensaje de noticias
38bd2158@newsgroups.ni.com...
>
> Good Morning!
> I have an application using menus as the primary user interface tool.
> I want to stop a while loop, but have only been able to do so with a push
>
> button.
> Any suggestions or solutions are much appreciated.
> Thanks in advance
> Dave
0 Kudos
Message 3 of 4
(2,658 Views)
What you can do is put the "Get Menu Selection" inside a while loop and wire
the "item tag" output to the selector of a case statement. You can also get
fancier and combine the above with "Insert Queue Element" and "Remove Queue
Element" to create a very flexible state machine.
"Dave Gearhart" wrote:
>>Good Morning!>I have an application using menus as the primary user interface
tool. >I want to stop a while loop, but have only been able to do so with
a push>>button. >Any suggestions or solutions are much appreciated. >Thanks
in advance>Dave
0 Kudos
Message 4 of 4
(2,658 Views)