LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event time loop

Good morning I have a "concept" problem with event handling in LABVIEW.
I have a time loop with an indicator for the loop counter .
If I insert an event structure (based on a Run Time Menu choice) inside the loop, the counter DOESN'T INCREASE anymore and increases only if I select the Run Time MEnu. The VI seems not to run. How can I avoid this?
Thank you,
 
Fede
0 Kudos
Message 1 of 5
(3,249 Views)
Actually the VI is running, otherwise you could not see the counter increment. The loop pauses until an event occurs - that's exactly the sense of the case structure.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 5
(3,248 Views)
Sorry but I can't understand.
My problem is the following. I'd like to set a global variable by means of the run time menu and by checkingh this variable to stop or not the while loop. The only way to do this is to put the event structure outside the while loop?
Thank you,
 
Fede
0 Kudos
Message 3 of 5
(3,246 Views)
Wire the timeout of the event case (Hour glass in the top left corner) to something you can use, like 100ms or whatever.  This will then make the event case wait for events only so long before timing out, allowing the rest of the code in the loop to run.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 4 of 5
(3,244 Views)

hi there

be aware that an event structure inside a timed loop disturbs the behaviour of the loop. the code inside the loop won't be executed with the selected rate anymore, because the loop has to wait for the events or the timeout. on the other side the event structure has to wait for the next turn of the timed loop to start event catching again.

i'd suggest to use a standard while loop instead of a timed loop in conjunction with a event structure.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 5 of 5
(3,236 Views)