LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event from an Event in a while loop

Let's say I am in a while loop in an event. During this time, I would like to trigger another event. Is this possible?
0 Kudos
Message 1 of 4
(2,758 Views)

Example attached:

 

Boolean 3 is pressed to set to true; 1st event is entered. Boolean 2 is set to True. It stays in the while loop indefinitely.

 

I try to press Boolean 4 to set Boolean 5 to True, but it does not let me.

0 Kudos
Message 2 of 4
(2,756 Views)

Hi Henry A,

it's not a good idea to insert a while loop inside an event case. I recommend to only use one event strucutre. Can you please explain what you need? I'm sure we will find a solution for you.

 

Mike

Message 3 of 4
(2,742 Views)

Herny,

 

you are running into caveats of the event structure. Esp. this caveat is the one you have implemented.

 

I recommend you not to use more than a single event structure in your whole project. That is, of course, not suitable for certain projects, but in general a very good advice since it reduces the chances to run into issues very much.

Furthermore, please note that events lock the frontpanel by default. See here for more information.

 

hope this helps,

Norbert 

 

[EDIT] Taking a closer look into your right loop/event structure/loop - construct: your vi creates an infinite loop eating up 100% CPU load when pressing Boolean 3. Never ever do that!

Message Edited by Norbert B on 01-13-2009 02:18 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 4
(2,739 Views)